Class RandomComparator<T,​A,​V extends java.lang.Comparable<V>>

  • All Implemented Interfaces:
    java.util.Comparator<BackPointerPath<T,​A,​V>>

    public class RandomComparator<T,​A,​V extends java.lang.Comparable<V>>
    extends java.lang.Object
    implements java.util.Comparator<BackPointerPath<T,​A,​V>>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(BackPointerPath<T,​A,​V> first, BackPointerPath<T,​A,​V> second)
      Randomly outputs a negative or positive integer.
      • 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
    • Constructor Detail

      • RandomComparator

        public RandomComparator()
    • Method Detail

      • compare

        public int compare​(BackPointerPath<T,​A,​V> first,
                           BackPointerPath<T,​A,​V> second)
        Randomly outputs a negative or positive integer. (Never zero).
        Specified by:
        compare in interface java.util.Comparator<T>
        Parameters:
        first -
        second -
        Returns:
        negative iff first.n < second.n, 0 iff first.n == second.n, positive iff first.n > second.n