Package org.apache.wiki.util.comparators
Class PrincipalComparator
- java.lang.Object
-
- org.apache.wiki.util.comparators.PrincipalComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Comparator<java.security.Principal>
public class PrincipalComparator extends java.lang.Object implements java.util.Comparator<java.security.Principal>, java.io.Serializable
Comparator class for sorting objects of type Principal. Used for sorting arrays or collections of Principals.- Since:
- 2.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrincipalComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.security.Principal o1, java.security.Principal o2)
Compares two Principal objects.
-
-
-
Constructor Detail
-
PrincipalComparator
public PrincipalComparator()
-
-
Method Detail
-
compare
public int compare(java.security.Principal o1, java.security.Principal o2)
Compares two Principal objects.- Specified by:
compare
in interfacejava.util.Comparator<java.security.Principal>
- Parameters:
o1
- the first Principalo2
- the second Principal- Returns:
- the result of the comparison
- See Also:
Comparator.compare(Object, Object)
-
-