org.apache.wiki.auth
Class PrincipalComparator

java.lang.Object
  extended by org.apache.wiki.auth.PrincipalComparator
All Implemented Interfaces:
Serializable, Comparator<Principal>

public class PrincipalComparator
extends Object
implements Comparator<Principal>, 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
PrincipalComparator()
           
 
Method Summary
 int compare(Principal o1, Principal o2)
          Compares two Principal objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

PrincipalComparator

public PrincipalComparator()
Method Detail

compare

public int compare(Principal o1,
                   Principal o2)
Compares two Principal objects.

Specified by:
compare in interface Comparator<Principal>
Parameters:
o1 - the first Principal
o2 - the second Principal
Returns:
the result of the comparison
See Also:
Comparator.compare(Object, Object)


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.