Class FixedOrdering<T>

  • All Implemented Interfaces:
    java.util.Comparator<T>, ProperlyPrintable

    public class FixedOrdering<T>
    extends java.lang.Object
    implements java.util.Comparator<T>, ProperlyPrintable
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedOrdering​(T... ts)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(T o1, T o2)  
      java.util.Set<T> elements()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • FixedOrdering

        @SafeVarargs
        public FixedOrdering​(T... ts)
    • Method Detail

      • elements

        public java.util.Set<T> elements()
      • compare

        public int compare​(T o1,
                           T o2)
        Specified by:
        compare in interface java.util.Comparator<T>
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface ProperlyPrintable
        Overrides:
        toString in class java.lang.Object