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.cleverbus.core.common.version.comparator.VersionInfoVersionComparator.java

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

From source file FileNameComparator.java

/**
 * Sorts files by name (directories before files).
 *
 * @author Luciano Vernaschi
 */
final class FileNameComparator implements Comparator, Serializable {

From source file org.jasig.portal.io.xml.eventaggr.ExternalAggregatedGroupMappingComparator.java

/**
 * Sort group mappings
 * 
 * @author Eric Dalquist
 */
public class ExternalAggregatedGroupMappingComparator implements Comparator<ExternalAggregatedGroupMapping> {

From source file com.redhat.rhn.common.util.DynamicComparator.java

/**
 * DynamicComparator - simple class that can be
 * used with Collections.sort(list, comparator).
 * Create an instance of this class with the
 * passed in fieldname and it will create a Comparator
 * that will compare two objects based on the field

From source file net.sf.infrared.web.util.BeanComparator.java

/**
 * A simple comparator implementation that enables comparing two
 * bean instances based on a specified property.
 */
public class BeanComparator implements Comparator {
    String methodName = null;

From source file com.evolveum.midpoint.web.component.wizard.resource.dto.ConnectorHostTypeComparator.java

/**
 * @author lazyman
 */
public class ConnectorHostTypeComparator implements Comparator<PrismObject<ConnectorHostType>>, Serializable {

    @Override

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 com.opengamma.engine.depgraph.OrderedRunQueue.java

/**
 * Run queue implementation based on sorting the runnable tasks. When the run queue is small, this is comparable to {@link ConcurrentLinkedQueueRunQueue} or {@link StackRunQueue} implementations as
 * the sorting operation is not performed. As the run queue length grows and exceeds the capacity of the target resolution cache, the cost of ordering the operations may be offset by better use of the
 * cache. Some function repositories and graph structures may still benefit from the simpler {@link StackRunQueue} implementation which can give good cache performance without any ordering costs.
 */
/* package */final class OrderedRunQueue implements RunQueue, Comparator<ContextRunnable> {

From source file com.optaros.alfresco.docasu.wcs.helper.NodeRefWrapperComparator.java

/**
 * Use this class to sort NodeRefWrapper objects specifying a sorting property
 * and the direction.
 * 
 * @author Viorel Andronic
 * 

From source file edu.harvard.iq.safe.lockss.impl.LockssDaemonVersion.java

/**
 *
 * @author Akio Sone
 */
public class LockssDaemonVersion implements Comparator<LockssDaemonVersion> {
    static final Logger logger = Logger.getLogger(LockssDaemonVersion.class.getName());