Package org.restlet.engine.util
Class AlphabeticalComparator
- java.lang.Object
-
- org.restlet.engine.util.AlphabeticalComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Comparator<org.restlet.data.Reference>
- Direct Known Subclasses:
AlphaNumericComparator
public class AlphabeticalComparator extends java.lang.Object implements java.util.Comparator<org.restlet.data.Reference>, java.io.Serializable
Allows to sort the list of references set by the resource.- Author:
- Jerome Louvel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AlphabeticalComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.String str0, java.lang.String str1)
Compares two strings.int
compare(org.restlet.data.Reference ref0, org.restlet.data.Reference ref1)
Compares two references.
-
-
-
Method Detail
-
compare
public int compare(org.restlet.data.Reference ref0, org.restlet.data.Reference ref1)
Compares two references.- Specified by:
compare
in interfacejava.util.Comparator<org.restlet.data.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
-
-