Class 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
    • 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.
      • 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Method Detail

      • compare

        public int compare​(java.security.Principal o1,
                           java.security.Principal o2)
        Compares two Principal objects.
        Specified by:
        compare in interface java.util.Comparator<java.security.Principal>
        Parameters:
        o1 - the first Principal
        o2 - the second Principal
        Returns:
        the result of the comparison
        See Also:
        Comparator.compare(Object, Object)