Example usage for java.util Comparator interface-usage

List of usage examples for java.util Comparator interface-usage

Introduction

In this page you can find the example usage for java.util Comparator interface-usage.

Usage

From source file ddf.catalog.transformer.csv.CsvAttributeDescriptorComparator.java

/**
 * An implementation of java.util.Comparator that sorts AttributeDescriptors according to the
 * provided list of attribute names. This allows us to put the output csv columns in any order as
 * specified by the user.
 *
 * @see java.util.Comparator

From source file Person.java

class PersonComparator implements Comparator<Person> {
    public int compare(Person emp1, Person emp2) {
        int nameComp = emp1.getLastName().compareTo(emp2.getLastName());
        return ((nameComp == 0) ? emp1.getFirstName().compareTo(emp2.getFirstName()) : nameComp);
    }
}

From source file org.codehaus.groovy.grails.scaffolding.DomainClassPropertyComparator.java

/**
 * Comparator that uses the domain class property constraints to establish order in sort methods and always
 * places the id first.
 *
 * @author Graeme Rocher
 * @deprecated Use org.codehaus.groovy.grails.validation.DomainClassPropertyComparator instead

From source file com.xpn.xwiki.objects.ElementComparator.java

/**
 * Compare and sort instances of ElementInterface by name.
 * 
 */
public class ElementComparator implements Comparator {
    /**

From source file org.carewebframework.ui.zk.RowComparator.java

/**
 * Serves as a generic comparator for list and grid displays.
 */
public class RowComparator implements Comparator<Object>, Serializable {

    private static final Log log = LogFactory.getLog(RowComparator.class);

From source file ddf.catalog.transformer.csv.common.CsvAttributeDescriptorComparator.java

/**
 * An implementation of java.util.Comparator that sorts AttributeDescriptors according to the
 * provided list of attribute names. This allows us to put the output csv columns in any order as
 * specified by the user.
 *
 * @see java.util.Comparator

From source file org.cleverbus.core.common.version.comparator.VersionInfoRevisionComparator.java

/**
 * Compares {@link VersionInfo} objects by title.
 *
 * @author <a href="mailto:michal.palicka@cleverlance.com">Michal Palicka</a>
 * @version $Id: VersionInfoRevisionComparator.java 5073 2011-01-23 12:54:01Z mbenda@CLANCE.LOCAL $
 */

From source file org.cleverbus.core.common.version.comparator.VersionInfoTimestampComparator.java

/**
 * Compares {@link VersionInfo} objects by title.
 *
 * @author <a href="mailto:michal.palicka@cleverlance.com">Michal Palicka</a>
 * @version $Id: VersionInfoTimestampComparator.java 5073 2011-01-23 12:54:01Z mbenda@CLANCE.LOCAL $
 */

From source file org.cleverbus.core.common.version.comparator.VersionInfoTitleComparator.java

/**
 * Compares {@link VersionInfo} objects by title.
 *
 * @author <a href="mailto:michal.palicka@cleverlance.com">Michal Palicka</a>
 * @version $Id: VersionInfoTitleComparator.java 5073 2011-01-23 12:54:01Z mbenda@CLANCE.LOCAL $
 */

From source file org.cleverbus.core.common.version.comparator.VersionInfoVendorIdComparator.java

/**
 * Compares {@link VersionInfo} objects by vendor ID.
 *
 * @author <a href="mailto:michal.palicka@cleverlance.com">Michal Palicka</a>
 * @version $Id: VersionInfoVendorIdComparator.java 8499 2012-04-16 17:10:32Z jloose@CLANCE.LOCAL $
 */