Class InverseComparator<T>

java.lang.Object
com.oracle.coherence.common.base.InverseComparator<T>
All Implemented Interfaces:
Comparator<T>

public class InverseComparator<T> extends Object implements Comparator<T>
InverseComparator is a wrapper comparator which simply inverses the comparison result.
Author:
mf 2014.08.28
  • Field Details

    • f_comparator

      protected final Comparator<T> f_comparator
      The comparator to invert.
    • INSTANCE

      public static final InverseComparator INSTANCE
      InverseComparator singleton which inverts a Comparable objects natural comparison order.
  • Constructor Details

    • InverseComparator

      public InverseComparator(Comparator<T> comparator)
      Construct an InverseComparator which inverts the specified comparator.
      Parameters:
      comparator - the comparator to invert
  • Method Details