Class ISets
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ISet
<T> hashed()
Constructs an unsorted set.static <T> ISet
<T> Constructs an unsorted set containing the values from source.static <T> ISet
<T> Constructs an unsorted set containing the values from source.static <T> ISet
<T> hashed
(T... source) Constructs an unsorted set containing the values from source.static <T> ISetBuilder
<T> Constructs Builder object to produce unsorted sets.static <T> ISet
<T> ordered()
Constructs an empty set that sorts values based on the order they were originally added to the set.static <T> ISet
<T> Constructs a set containing all of the values in source that sorts values based on the order they were originally added to the set.static <T> ISet
<T> Constructs a set containing all of the values in source that sorts values based on the order they were originally added to the set.static <T> ISet
<T> ordered
(T... source) Constructs a set containing all of the values in source that sorts values based on the order they were originally added to the set.static <T> ISetBuilder
<T> Constructs Builder object to produce sets that sort values based on the order they were originally added to the set.static <T extends Comparable<T>>
ISet<T> sorted()
Constructs an empty set that sorts values in their natural sort order (using ComparableComparator).static <T extends Comparable<T>>
ISet<T> Constructs a set containing all of the values in source that sorts values in their natural sort order (using ComparableComparator).static <T> ISet
<T> sorted
(Comparator<T> comparator) Constructs an empty set that sorts values using comparator.static <T> ISet
<T> sorted
(Comparator<T> comparator, Iterable<? extends T> source) Constructs a set containing all of the values in source that sorts values using comparator.static <T> ISet
<T> sorted
(Comparator<T> comparator, Iterator<? extends T> source) Constructs a set containing all of the values in source that sorts values using comparator.static <T> ISet
<T> sorted
(Comparator<T> comparator, T... source) Constructs a set containing all of the values in source that sorts values using comparator.static <T extends Comparable<T>>
ISet<T> Constructs a set containing all of the values in source that sorts values in their natural sort order (using ComparableComparator).static <T extends Comparable<T>>
ISet<T> sorted
(T... source) Constructs a set containing all of the values in source that sorts values in their natural sort order (using ComparableComparator).static <T extends Comparable<T>>
ISetBuilder<T> Constructs a Builder object to produce sets that sort values in their natural sort order (using ComparableComparator).static <T> ISetBuilder
<T> sortedBuilder
(Comparator<T> comparator) Constructs a Builder object to produce sets that sort values using specified Comparator.
-
Method Details
-
hashed
Constructs an unsorted set.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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 set containing the values from source.Implementation note: The set 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 set containing the values from source.Implementation note: The set 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 set containing the values from source.Implementation note: The set 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 set 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>> ISet<T> sorted(@Nonnull Iterable<? extends T> source) Constructs a set 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>> ISet<T> sorted(@Nonnull Iterator<? extends T> source) Constructs a set containing all of the values in source that sorts values in their natural sort order (using ComparableComparator). -
sorted
Constructs an empty set 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> ISet<T> sorted(@Nonnull Comparator<T> comparator, T... source) Constructs a set 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> ISet<T> sorted(@Nonnull Comparator<T> comparator, @Nonnull Iterable<? extends T> source) Constructs a set 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> ISet<T> sorted(@Nonnull Comparator<T> comparator, @Nonnull Iterator<? extends T> source) Constructs a set 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 an empty set that sorts values based on the order they were originally added to the set.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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.
-
ordered
Constructs a set containing all of the values in source that sorts values based on the order they were originally added to the set.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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.
-
ordered
Constructs a set containing all of the values in source that sorts values based on the order they were originally added to the set.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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.
-
ordered
Constructs a set containing all of the values in source that sorts values based on the order they were originally added to the set.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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.
-
hashedBuilder
Constructs Builder object to produce unsorted sets.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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.
-
sortedBuilder
Constructs a Builder object to produce sets that sort values in their natural sort order (using ComparableComparator). -
sortedBuilder
Constructs a Builder object to produce sets that sort values using specified Comparator. -
orderedBuilder
Constructs Builder object to produce sets that sort values based on the order they were originally added to the set.Implementation note: The set will adopt a hash code collision strategy based on the first value assigned to the set. 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.
-