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.nuxeo.ecm.platform.ui.web.directory.DirectorySelectItemComparator.java

/**
 * @author <a href="mailto:glefter@nuxeo.com">George Lefter</a>
 */
public class DirectorySelectItemComparator implements Comparator<DirectorySelectItem>, Serializable {

    private static final long serialVersionUID = 1L;

From source file org.emonocot.model.compare.ReferenceComparator.java

public class ReferenceComparator implements Comparator<Reference> {

    private NullComparator nullSafeStringComparator;

    public ReferenceComparator() {
        Comparator<String> stringComparator = new Comparator<String>() {

From source file org.apache.syncope.client.console.commons.AnyTypeComparator.java

public class AnyTypeComparator implements Comparator<AnyTypeTO>, Serializable {

    private static final long serialVersionUID = -8227715253094467138L;

    @Override
    public int compare(final AnyTypeTO o1, final AnyTypeTO o2) {

From source file com.ecml.FileUri.java

/** @class FileUri
 * <br>
 * Represents a reference to a file.
 * The file could be either in the /assets directory, 
 * the internal storage, or the external storage.
 */

From source file Person.java

class ComparePerson implements Comparator<Person> {
    @Override
    public int compare(Person p1, Person p2) {
        if (p1.getFname().equalsIgnoreCase(p2.getFname())) {
            return p1.getLname().compareTo(p2.getLname());
        }

From source file edu.internet2.middleware.subject.provider.LdapComparator.java

public class LdapComparator implements Comparator {

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

    public LdapComparator() {
        super();

From source file Employee.java

class EmpComparator implements Comparator {
    public int compare(Object obj1, Object obj2) {
        Employee emp1 = (Employee) obj1;
        Employee emp2 = (Employee) obj2;

        int nameComp = emp1.getName().compareTo(emp2.getName());

From source file pt.webdetails.cda.utils.NaturalOrderComparator.java

/**
 *
 * @author pdpi
 */
public class NaturalOrderComparator implements Comparator<Integer> {

From source file hydrograph.ui.graph.model.LinkComparatorBySourceLocation.java

/**
 * The Class LinkComparatorBySourceLocation.
 * <p>
 * This class is used to sort the links on basis of link's source terminals
 * 
 * @author Bitwise

From source file org.rhq.enterprise.gui.legacy.taglib.display.BeanSorter.java

/**
 * This utility class is used to sort the list that the table is viewing based on arbitrary properties of objects
 * contained in that list. The only assumption made is that the object returned by the property is either a native type,
 * or implements the Comparable interface. If the property does not implement Comparable, then this little sorter object
 * will just assume that all objects are the same, and quietly do nothing (so you should check for Comparable
 * objecttypes elsewhere as this object won't complain).