Class IMultisets
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> IMultiset
<T> hashed()
Constructs an unsorted multiset.static <T> IMultiset
<T> Constructs an unsorted multiset containing the values from source.static <T> IMultiset
<T> Constructs an unsorted multiset containing the values from source.static <T> IMultiset
<T> hashed
(T... source) Constructs an unsorted multiset containing the values from source.static <T> IMultiset
<T> ordered()
Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset.static <T> IMultiset
<T> Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset.static <T> IMultiset
<T> Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset.static <T> IMultiset
<T> ordered
(T... source) Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset.static <T extends Comparable<T>>
IMultiset<T> sorted()
Constructs an empty set that sorts values in their natural sort order (using ComparableComparator).static <T extends Comparable<T>>
IMultiset<T> Constructs a multiset containing all of the values in source that sorts values in their natural sort order (using ComparableComparator).static <T> IMultiset
<T> sorted
(Comparator<T> comparator) Constructs an empty multiset that sorts values using comparator.static <T> IMultiset
<T> sorted
(Comparator<T> comparator, Iterable<? extends T> source) Constructs a multiset containing all of the values in source that sorts values using comparator.static <T> IMultiset
<T> sorted
(Comparator<T> comparator, Iterator<? extends T> source) Constructs a multiset containing all of the values in source that sorts values using comparator.static <T> IMultiset
<T> sorted
(Comparator<T> comparator, T... source) Constructs a multiset containing all of the values in source that sorts values using comparator.static <T extends Comparable<T>>
IMultiset<T> Constructs a multiset containing all of the values in source that sorts values in their natural sort order (using ComparableComparator).static <T extends Comparable<T>>
IMultiset<T> sorted
(T... source) Constructs a multiset containing all of the values in source that sorts values in their natural sort order (using ComparableComparator).
-
Method Details
-
hashed
Constructs an unsorted multiset.Implementation note: The multiset will adopt a hash code collision strategy based on the first value assigned to the multiset. All values in the map must either implement Comparable (and be comparable to all other values in the set) or not implement Comparable. Attempting to use values some of which implement Comparable and some of which do not will lead to runtime errors. It is always safest to use homogeneous values in any set.
-
hashed
Constructs an unsorted multiset containing the values from source.Implementation note: The multiset will adopt a hash code collision strategy based on the first value in source. All values in the map must either implement Comparable (and be comparable to all other values in the set) or not implement Comparable. Attempting to use values some of which implement Comparable and some of which do not will lead to runtime errors. It is always safest to use homogeneous values in any set.
-
hashed
Constructs an unsorted multiset containing the values from source.Implementation note: The multiset will adopt a hash code collision strategy based on the first value in source. All values in the map must either implement Comparable (and be comparable to all other values in the set) or not implement Comparable. Attempting to use values some of which implement Comparable and some of which do not will lead to runtime errors. It is always safest to use homogeneous values in any set.
-
hashed
Constructs an unsorted multiset containing the values from source.Implementation note: The multiset will adopt a hash code collision strategy based on the first value in source. All values in the map must either implement Comparable (and be comparable to all other values in the set) or not implement Comparable. Attempting to use values some of which implement Comparable and some of which do not will lead to runtime errors. It is always safest to use homogeneous values in any set.
-
sorted
Constructs an empty set that sorts values in their natural sort order (using ComparableComparator). -
sorted
Constructs a multiset containing all of the values in source that sorts values in their natural sort order (using ComparableComparator). -
sorted
@Nonnull public static <T extends Comparable<T>> IMultiset<T> sorted(@Nonnull Iterable<? extends T> source) Constructs a multiset containing all of the values in source that sorts values in their natural sort order (using ComparableComparator). -
sorted
@Nonnull public static <T extends Comparable<T>> IMultiset<T> sorted(@Nonnull Iterator<? extends T> source) Constructs a multiset containing all of the values in source that sorts values in their natural sort order (using ComparableComparator). -
sorted
Constructs an empty multiset that sorts values using comparator.Note that the Comparator MUST BE IMMUTABLE. The Comparator will be retained and used throughout the life of the map and its offspring and will be aggressively shared so it is imperative that the Comparator be completely immutable.
-
sorted
@Nonnull @SafeVarargs public static <T> IMultiset<T> sorted(@Nonnull Comparator<T> comparator, T... source) Constructs a multiset containing all of the values in source that sorts values using comparator.Note that the Comparator MUST BE IMMUTABLE. The Comparator will be retained and used throughout the life of the map and its offspring and will be aggressively shared so it is imperative that the Comparator be completely immutable.
-
sorted
@Nonnull public static <T> IMultiset<T> sorted(@Nonnull Comparator<T> comparator, @Nonnull Iterable<? extends T> source) Constructs a multiset containing all of the values in source that sorts values using comparator.Note that the Comparator MUST BE IMMUTABLE. The Comparator will be retained and used throughout the life of the map and its offspring and will be aggressively shared so it is imperative that the Comparator be completely immutable.
-
sorted
@Nonnull public static <T> IMultiset<T> sorted(@Nonnull Comparator<T> comparator, @Nonnull Iterator<? extends T> source) Constructs a multiset containing all of the values in source that sorts values using comparator.Note that the Comparator MUST BE IMMUTABLE. The Comparator will be retained and used throughout the life of the map and its offspring and will be aggressively shared so it is imperative that the Comparator be completely immutable.
-
ordered
Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset. -
ordered
Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset. -
ordered
Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset. -
ordered
Constructs a multiset containing all of the values in source that sorts values based on the order they were originally added to the multiset.
-