001    /**
002     * www.jcoverage.com
003     * Copyright (C)2003 jcoverage ltd.
004     *
005     * This file is part of jcoverage.
006     *
007     * jcoverage is free software; you can redistribute it and/or modify
008     * it under the terms of the GNU General Public License as published
009     * by the Free Software Foundation; either version 2 of the License,
010     * or (at your option) any later version.
011     *
012     * jcoverage is distributed in the hope that it will be useful, but
013     * WITHOUT ANY WARRANTY; without even the implied warranty of
014     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015     * General Public License for more details.
016     *
017     * You should have received a copy of the GNU General Public License
018     * along with jcoverage; if not, write to the Free Software
019     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
020     * USA
021     *
022     */
023    package com.jcoverage.coverage.reporting.collation;
024    
025    import java.util.Comparator;
026    
027    public class Ordering {
028    
029      String prefix;
030      Comparator comparator;
031      String description;
032    
033      /**
034       * Construct a default ordering
035       */
036      public Ordering(Comparator comparator,String description) {
037        this(null,comparator,description);
038      }
039    
040      /**
041       * Construct a default ordering
042       */
043      public Ordering(String prefix,Comparator comparator,String description) {
044        this.prefix=prefix;
045        this.comparator=comparator;
046        this.description=description;
047      }
048    
049      /**
050       * @return the report filename prefix to prevent filename clashes, or null if this is the default ordering
051       */
052      public String getPrefix() {
053        return prefix;
054      }
055    
056      public Comparator getComparator() {
057        return comparator;
058      }
059    
060      public String getDescription() {
061        return description;
062      }
063    
064    }