Class SortedBag.WrapperComparator

  • All Implemented Interfaces:
    Comparator
    Enclosing class:
    SortedBag<E>

    protected class SortedBag.WrapperComparator
    extends Object
    implements Comparator
    WrapperComparator is a Comparator implementation that is aware of SortedBag.UniqueElement wrappers and will delegate the comparison of the elements in both forms to the wrapped comparator.
    • Field Detail

      • f_comparator

        protected final Comparator f_comparator
        The underlying "logical" comparator.
    • Constructor Detail

      • WrapperComparator

        public WrapperComparator​(Comparator comparator)
        Construct a WrapperComparator around the specified comparator.
        Parameters:
        comparator - the underlying comparator