A multiset which maintains the ordering of its elements, according to either their natural order or an explicit {@link Comparator}. In all cases, this implementation uses {@link Comparable#compareTo} or {@link Comparator#compare} instead of {@link Object#equals} to determineequivalence of instances.
Warning: The comparison must be consistent with equals as explained by the {@link Comparable} class specification. Otherwise, theresulting multiset will violate the {@link java.util.Collection} contract,which is specified in terms of {@link Object#equals}.
@author Neal Kanodia
@author Jared Levy
@since Guava release 02 (imported from Google Collections Library)