Package org.restlet.engine.util
Class AlphabeticalComparator
- java.lang.Object
-
- org.restlet.engine.util.AlphabeticalComparator
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Comparator<Reference>
- Direct Known Subclasses:
AlphaNumericComparator
public class AlphabeticalComparator extends java.lang.Object implements java.util.Comparator<Reference>, java.io.Serializable
Allows to sort the list of references set by the resource.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description AlphabeticalComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.lang.String str0, java.lang.String str1)Compares two strings.intcompare(Reference ref0, Reference ref1)Compares two references.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
compare
public int compare(Reference ref0, Reference ref1)
Compares two references.- Specified by:
comparein interfacejava.util.Comparator<Reference>- Parameters:
ref0- The first reference.ref1- The second reference.- Returns:
- The comparison result.
- See Also:
Comparator
-
compare
public int compare(java.lang.String str0, java.lang.String str1)Compares two strings.- Parameters:
str0- The first string.str1- The second string.- Returns:
- The comparison result.
- See Also:
Comparator
-
-