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 org.openanzo.client.cli.StatementComparator.java

/**
 * Sorts statements by named graph, then subject, pred, obj. This sorting results in well framed serialized rdf.
 * 
 * @author Joe Betz <jpbetz@cambridgesemantics.com>
 * 
 */

From source file de.thischwa.pmcms.tool.file.FileComparator.java

/**
 * Comparator for generating a traverseable file list e.g. to reduce change directory commands while copying. 
 * The sort order is 1st the full path of the directory and 2nd the name of the file.
 *
 * @author Thilo Schwarz
 */

From source file com.mitre.core.search.solrfacetsearch.provider.entity.GenericVariantProductModelComparator.java

/**
 * Comparator for type {@link GenericVariantProductModel}.
 * @Deprecated see {@link de.hybris.platform.b2bacceleratorfacades.search.solrfacetsearch.provider.entity.GenericVariantProductModelComparator}
 */
@Deprecated
public class GenericVariantProductModelComparator implements Comparator<GenericVariantProductModel> {

From source file org.drools.planner.examples.nurserostering.domain.solver.ShiftAssignmentDifficultyComparator.java

public class ShiftAssignmentDifficultyComparator implements Comparator<ShiftAssignment>, Serializable {

    public int compare(ShiftAssignment a, ShiftAssignment b) {
        Shift aShift = a.getShift();
        Shift bShift = b.getShift();
        return new CompareToBuilder().append(bShift.getShiftDate(), aShift.getShiftDate()) // Descending

From source file com.jnj.b2b.core.search.solrfacetsearch.provider.entity.GenericVariantProductModelComparator.java

/**
 * Comparator for type {@link GenericVariantProductModel}.
 * @Deprecated see {@link de.hybris.platform.b2bacceleratorfacades.search.solrfacetsearch.provider.entity.GenericVariantProductModelComparator}
 */
@Deprecated
public class GenericVariantProductModelComparator implements Comparator<GenericVariantProductModel> {

From source file org.drools.planner.examples.vehiclerouting.domain.solver.VrpCustomerDifficultyComparator.java

public class VrpCustomerDifficultyComparator implements Comparator<VrpCustomer>, Serializable {

    public int compare(VrpCustomer a, VrpCustomer b) {
        return new CompareToBuilder()
                // TODO experiment with (aLatitude - bLatitude) % 10
                .append(a.getLocation().getLatitude(), b.getLocation().getLatitude())

From source file com.aw.support.beans.PropertyComparator.java

/**
 * PropertyComparator performs a comparison of two beans,
 * using the specified bean property via a BeanWrapper.
 *
 * @author Juergen Hoeller
 * @author Jean-Pierre Pawlak

From source file org.apache.wiki.util.comparators.JavaNaturalComparator.java

/**
 * A comparator that sorts Strings using Java's "natural" order.
 * 
 */
public class JavaNaturalComparator implements Comparator<String> {
    // A special singleton instance for quick access

From source file com.feilong.taglib.display.breadcrumb.comparator.BreadCrumbEntityComparator.java

/**
 * The Class BreadCrumbEntityComparator.
 *
 * @author <a href="http://feitianbenyue.iteye.com/">feilong</a>
 * @param <PK>
 *            the generic type

From source file org.kuali.rice.krad.comparator.NumericValueComparator.java

public class NumericValueComparator implements Serializable, Comparator {

    static final long serialVersionUID = 3449202365486147519L;

    private static final NumericValueComparator theInstance = new NumericValueComparator();