public interface ISet<V> extends ICollection<ISet<V>,V>, Predicate<V>
| Modifier and Type | Method and Description |
|---|---|
default ISet<V> |
add(V value) |
default boolean |
contains(V value) |
default boolean |
containsAll(IMap<V,?> map) |
default boolean |
containsAll(ISet<V> set) |
default boolean |
containsAny(IMap<V,?> map) |
default boolean |
containsAny(ISet<V> set) |
default ISet<V> |
difference(ISet<V> set) |
default IList<V> |
elements() |
default ISet<V> |
forked()
This returns a data structure which is forked, which is equivalent to Clojure's persistent
data structures, also sometimes called functional or immutable.
|
OptionalLong |
indexOf(V element) |
default ISet<V> |
intersection(ISet<V> set) |
default boolean |
isLinear() |
default Iterator<V> |
iterator() |
default ISet<V> |
linear()
This returns a data structure which is linear, or temporarily mutable.
|
default ISet<V> |
remove(V value) |
default IList<? extends ISet<V>> |
split(int parts)
Splits the collection into roughly even pieces, for parallel processing.
|
default Spliterator<V> |
spliterator() |
default Stream<V> |
stream() |
default boolean |
test(V v) |
default Object[] |
toArray() |
default V[] |
toArray(IntFunction<V[]> allocator) |
default Set<V> |
toSet() |
default ISet<V> |
union(ISet<V> set) |
BiPredicate<V,V> |
valueEquality() |
ToLongFunction<V> |
valueHash() |
default <U> IMap<V,U> |
zip(Function<V,U> f) |
ToLongFunction<V> valueHash()
BiPredicate<V,V> valueEquality()
default boolean contains(V value)
valuedefault <U> IMap<V,U> zip(Function<V,U> f)
f, for each element in the setOptionalLong indexOf(V element)
element in the collection, if it's presentdefault boolean containsAll(ISet<V> set)
setdefault boolean containsAll(IMap<V,?> map)
mapdefault boolean containsAny(ISet<V> set)
setdefault boolean containsAny(IMap<V,?> map)
mapdefault Spliterator<V> spliterator()
spliterator in interface Iterable<V>default ISet<V> difference(ISet<V> set)
setdefault ISet<V> intersection(ISet<V> set)
setdefault Set<V> toSet()
UnsupportedOperationException on writesdefault Object[] toArray()
default V[] toArray(IntFunction<V[]> allocator)
allocator - a function which creates an array of the specified sizedefault boolean isLinear()
isLinear in interface ICollection<ISet<V>,V>default ISet<V> forked()
ICollectionIf only a single function or scope uses the data structure, it can be left as a linear data structure, which can have significant performance benefits.
If the data structure is already forked, it will simply return itself.
forked in interface ICollection<ISet<V>,V>default ISet<V> linear()
ICollection
If ICollection.forked() is called on a linear collection, all references to that linear collection should be discarded.
If the data structure is already linear, it will simply return itself.
linear in interface ICollection<ISet<V>,V>default IList<? extends ISet<V>> split(int parts)
ICollectionparts subsets.split in interface ICollection<ISet<V>,V>parts - the target number of pieces