VCollections – Release 1
Index
A
- add(V) - Method in interface Builder
-
Add an element to be included in the collection.
- add(Binding<? extends K, ? extends V>) - Method in interface MapBuilder
-
Add a binding to be included in the map, replacing any previously added binding with the same key.
- add(K, V) - Method in interface MapListBuilder
-
Add an element at the end of the list associated with the specified key.
- add(K, V) - Method in interface MapSetBuilder
-
Add an element to the set associated with the specified key.
- addAll(Iterable<? extends V>) - Method in interface Builder
-
A convenience method to add the elements obtained from the supplied iterable collection.
- addAll(Iterable<Binding<K, V>>) - Method in interface MapBuilder
-
A convenience method to add a collection of bindings.
- addAll(K, IList<V>) - Method in interface MapListBuilder
-
Add elements at the end of the list associated with the specified key.
- addAll(K, ICollection<V>) - Method in interface MapSetBuilder
-
Add elements to the set associated with the specified key.
- addAll(IMap<K, ISet<V>>) - Method in interface MapSetBuilder
-
Add elements to the set from the associated map.
- addEntries(Iterable<Map.Entry<? extends K, ? extends V>>) - Method in interface MapBuilder
-
A convenience method to add a collection of bindings.
- addOptional(V) - Method in interface Builder
- appending(V) - Method in interface IList
-
Return a list with an additional value added at the end.
- appendingAll(Iterable<? extends V>) - Method in interface IList
-
Return a list with additional values added at the end.
- asIterable() - Method in interface IIterator
- asJavaMap() - Method in interface IMap
-
Return a new Java map containing the bindings of this map.
B
- Binding<K,V> - Interface in org.violetlib.collections
-
An immutable binding of a key to a value.
- Builder<V> - Interface in org.violetlib.collections
-
A collection builder.
- builder() - Static method in interface IList
-
Return a new list builder that uses a general purpose representation for the created lists.
- builder(ListUsage) - Static method in interface IList
-
Return a new list builder that constructs lists supporting the specified usage.
- builder(Option) - Static method in interface IList
-
Return a new list builder.
- builder() - Static method in interface IMap
-
Return a new map builder.
- builder(Option) - Static method in interface IMap
-
Return a new map builder.
- builder() - Static method in interface ISet
-
Create a builder for a set.
- builder(Option) - Static method in interface ISet
-
Create a builder for a set whose iteration order is defined by the order in which elements are added to the
builder.
C
- cast(ICollection<?>) - Static method in interface ICollection
-
Cast a collection to a specific type.
- cast(IList<?>) - Static method in interface IList
-
Cast a list to a specific type.
- cast(IMap<?, ?>) - Static method in interface IMap
-
Cast a map to a specific type.
- cast(ISet<?>) - Static method in interface ISet
-
Cast a set to a specific type.
- castNullable(IList<?>) - Static method in interface IList
-
Cast a list to a specific type.
- choose() - Method in interface ISet
-
Return one element of this set.
- chooseOptional() - Method in interface ISet
-
Return one element of this set, or null if the set is empty.
- collector() - Static method in interface IList
-
Return a new list builder that uses a general purpose representation for the created lists.
- collector(ListUsage) - Static method in interface IList
-
Return a new list builder that constructs lists supporting the specified usage.
- collector(Option) - Static method in interface IList
-
Return a new list builder.
- concatenate(IList<? extends ICollection<V>>) - Static method in interface ICollection
- concatenate(ICollection<? extends V>...) - Static method in interface ICollection
- concatenateIterators(IList<? extends IIterator<V>>) - Static method in interface ICollection
- contains(Object) - Method in interface ICollection
-
Return true if and only if the specified element is an element of the collection.
- contains(Object) - Method in interface IList
-
Return true if and only if the specified value is an element of the list.
- contains(Object) - Method in interface ISet
- containsKey(Object) - Method in interface IMap
- containsKey(K) - Method in interface MapBuilder
-
Indicate whether or not a binding is specified for a key.
- create(K, V) - Static method in interface Binding
- create(Iterable<? extends V>) - Static method in interface IList
-
Return a list containing the specified elements.
- create(V[]) - Static method in interface IList
-
Return a list containing the specified elements.
- create(int[]) - Static method in interface IList
-
Return a list containing the specified elements.
- create(long[]) - Static method in interface IList
-
Return a list containing the specified elements.
- create(float[]) - Static method in interface IList
-
Return a list containing the specified elements.
- create(double[]) - Static method in interface IList
-
Return a list containing the specified elements.
- create(ListUsage, Iterable<? extends V>) - Static method in interface IList
-
Return a list containing the specified elements, optimized for the specified usage.
- create(Map<? extends K, ? extends V>) - Static method in interface IMap
-
Return a map containing the specified bindings.
- create(Iterable<? extends V>) - Static method in interface ISet
-
Create a set containing the specified elements.
- create(V[]) - Static method in interface ISet
-
Create a set containing the specified elements.
- createOptional(Iterable<? extends V>) - Static method in interface IList
-
Return a list containing the specified elements.
- createOptional(V[]) - Static method in interface IList
-
Return a list containing the specified elements.
- createWeak(Map<? extends K, ? extends V>) - Static method in interface IMap
-
Return a map containing the specified bindings using weak references to the keys.
E
- element() - Method in interface ISet
-
Return the sole element of this set.
- empty() - Static method in interface IList
-
Return a list containing no elements.
- empty(ListUsage) - Static method in interface IList
-
Return a list containing no elements.
- empty() - Static method in interface IMap
-
Return a map containing no bindings.
- empty() - Static method in interface ISet
-
Return an empty set.
- emptyIterator() - Static method in interface ICollection
- extending(K, V) - Method in interface IMap
-
Return a map with a possibly updated binding for the specified key.
- extending(IMap<K, V>) - Method in interface IMap
-
Return a map with possibly additional or updated bindings.
- extending(V) - Method in interface ISet
-
Return a set containing the members of this set and the specified value.
- extendingAll(ICollection<? extends V>) - Method in interface ISet
-
Return a set containing the members of this set and the specified values.
F
- filter(Iterator<V>) - Static method in interface IIterator
-
Create an IIterator from an Iterator by filtering any nulls it returns.
- filter(Predicate<V>) - Method in interface ISet
- find(FindVisitor<V, R>) - Method in interface ICollection
-
Visit the elements of the collection until the visitor returns a non-null result.
- find(FindVisitor<V, R>, R) - Method in interface ICollection
-
Visit each element of the collection until the visitor returns a non-null result.
- find(FindVisitor<V, R>) - Method in interface IList
-
Visit the elements of the list from the first element to the last element until the visitor returns a non-null
result.
- find(FindVisitor<V, R>, R) - Method in interface IList
-
Visit each element of the list from the first element to the last element until the visitor returns a non-null
result.
- find(IMap.FVisitor<K, V, R>, R) - Method in interface IMap
- FindVisitor<E,R> - Interface in org.violetlib.collections
-
A visitor of elements in a collection that can short-circuit the iteration by returning a (non-null) result.
- first() - Method in interface IList
-
Return the first element of the list.
- from(Iterable<T>) - Static method in interface IIterable
-
Create an IIterable
from an Iterable
.
- from(Iterator<V>) - Static method in interface IIterator
-
Create an IIterator from an Iterator that does not return null.
- fromIndexedFindVisitor(IndexedFindVisitor<V, R>) - Static method in interface FindVisitor
-
Return a find visitor that calls an indexed find visitor.
- fromIndexedVisitor(IndexedVisitor<V>) - Static method in interface Visitor
-
Return a visitor that calls an indexed visitor.
G
- get(int) - Method in interface IList
-
Return the element with the specified index.
- get(K) - Method in interface IMap
-
Return the value associated with the specified key.
- get(K) - Method in interface MapBuilder
-
Return the value currently bound to a key
- getComparatorForKey(K) - Method in interface KeyedValueSorter
- getElements(int, int) - Method in interface IList
-
Return the elements with consecutive indexes.
- getKey() - Method in interface Binding
- getOptional(int) - Method in interface IList
-
Return the element with the specified index.
- getRequired(K) - Method in interface IMap
- getValue() - Method in interface Binding
- getValueCount(K) - Method in interface MapListBuilder
-
Return the number of values associated with the specified key.
- getValueCount(K) - Method in interface MapSetBuilder
-
Return the number of distinct values associated with the specified key.
- getValues(K) - Method in interface MapListBuilder
-
Return the values currently associated with the specified key.
- getValues(K) - Method in interface MapSetBuilder
-
Return the values currently associated with the specified key.
I
- ICollection<V> - Interface in org.violetlib.collections
-
Common methods for immutable collections.
- IIterable<T> - Interface in org.violetlib.collections
-
A specialization of the Iterable interface to return iterators declared to return only non-null values.
- IIterator<E> - Interface in org.violetlib.collections
-
A specialization of the Iterator interface that is declared to return only non-null values.
- IList<V> - Interface in org.violetlib.collections
-
An immutable ordered collection of elements.
- IMap<K,V> - Interface in org.violetlib.collections
-
An immutable map.
- IMap.FVisitor<K,V,R> - Interface in org.violetlib.collections
- IMap.Visitor<K,V> - Interface in org.violetlib.collections
- IndexedFindVisitor<V,R> - Interface in org.violetlib.collections
-
A visitor of elements in a list that receives elements along with their indexes and can short-circuit the iteration by
returning a result.
- IndexedVisitor<V> - Interface in org.violetlib.collections
-
A visitor of elements in a list that receives elements along with their indexes.
- indexOf(Object) - Method in interface IList
-
Return the index of the specified element in the list.
- inserting(int, V) - Method in interface IList
-
Return a list with a new value inserted at the specified position.
- insertingAll(int, Iterable<? extends V>) - Method in interface IList
-
Return a list with new values inserted at the specified position.
- intersecting(ISet<?>) - Method in interface ISet
- intersection(ISet<V>, ISet<?>) - Static method in interface ISet
- isEmpty() - Method in interface Builder
-
Indicate whether the collection created in the current state would be empty.
- isEmpty() - Method in interface ICollection
-
Return true if and only if there are no elements in the collection.
- isEmpty() - Method in interface IList
-
Return true if and only if there are no elements in the list.
- isEmpty() - Method in interface IMap
-
Return true if and only if the map contains no keys.
- isEmpty() - Method in interface ISet
- isEmpty() - Method in interface MapBuilder
-
Indicate whether the map created in the current state would be empty.
- ISet<V> - Interface in org.violetlib.collections
-
An immutable set of elements.
- iterator() - Method in interface IIterable
-
Returns an iterator over non-null elements of type T
.
K
- KeyedValueSorter<K,V> - Interface in org.violetlib.collections
- keys() - Method in interface MapListBuilder
-
Return the keys that have associated values.
- keys() - Method in interface MapSetBuilder
-
Return the keys that have associated values.
- keySet() - Method in interface IMap
L
- last() - Method in interface IList
-
Return the last element of the list.
- lastItem() - Method in interface ListBuilder
-
Identify the element that would be the last element of the list created in the current state.
- ListBuilder<V> - Interface in org.violetlib.collections
-
An interface for a list builder.
- ListUsage - Enum in org.violetlib.collections
-
Options to select a list implementation based on usage.
M
- map(Function<V, R>) - Method in interface IList
-
Return a list containing the result of applying a mapper to each list element.
- map(Function<V, R>) - Method in interface ISet
- MapBuilder<K,V> - Interface in org.violetlib.collections
-
An interface for a map builder.
- mapFilter(Function<V, R>) - Method in interface IList
-
Return a list containing the result of applying a mapper to each list element.
- mapListBuilder() - Static method in interface IMap
-
Return a new map list builder.
- mapListBuilder(Option) - Static method in interface IMap
-
Return a new map list builder.
- MapListBuilder<K,V> - Interface in org.violetlib.collections
-
Build an immutable map from keys of type K to immutable lists of values of type V.
- mapSetBuilder() - Static method in interface IMap
-
Return a new map set builder.
- mapSetBuilder(Option) - Static method in interface IMap
-
Return a new map set builder.
- MapSetBuilder<K,V> - Interface in org.violetlib.collections
-
Build an immutable map from keys of type K to immutable sets of values of type V.
N
- next() - Method in interface IIterator
-
Returns the next element in the iteration.
- NO_DUPLICATES - Static variable in interface IList
O
- of(V) - Static method in interface IList
-
Return a list containing a single element.
- of(V...) - Static method in interface IList
-
Return a list containing specified elements.
- of(Binding<? extends K, ? extends V>) - Static method in interface IMap
-
Return a map containing one binding.
- of(V) - Static method in interface ISet
- of(V...) - Static method in interface ISet
- ofOptional(V...) - Static method in interface IList
-
Return a list containing specified elements.
- onReverse() - Method in interface IList
-
Return a list containing the same elements as this list, but in the reverse order.
- onSlice(int, int) - Method in interface IList
-
Return a list containing a designated subsequence of the elements of this list.
- optimize(ListUsage) - Method in interface IList
-
Return an equivalent list whose representation efficiently supports the specified usage.
- optimizeForForwardTraversal() - Method in interface IList
-
Return an equivalent list whose representation efficiently supports forward traversal.
- optimizeForIndexing() - Method in interface IList
-
Return an equivalent list whose representation efficiently supports indexed access to list elements.
- optionalFirst() - Method in interface IList
-
Return the first element of the list.
- optionalLast() - Method in interface IList
-
Return the last element of the list.
- ORDERED - Static variable in interface IMap
- ORDERED - Static variable in interface ISet
- ordered() - Method in interface ISet
-
Return a set containing the members of this collection whose iteration order is defined by the natural sort order.
- ordered(Comparator<? super V>) - Method in interface ISet
-
Return a set containing the members of this collection whose iteration order is defined by the specified comparator.
- org.violetlib.collections - package org.violetlib.collections
P
- prepending(V) - Method in interface IList
-
Return a list with an additional value added at the beginning.
- put(K, V) - Method in interface MapBuilder
-
Add a binding to be included in the map, replacing any previously added binding with the same key.
- putOptional(K, V) - Method in interface MapBuilder
-
Optionally add a binding to be included in the map, replacing any previously added binding with the same key.
R
- removing(Object) - Method in interface IList
-
Return this list with a value removed.
- removing(int, int) - Method in interface IList
-
Return a list with consecutive elements removed.
- removing(Object) - Method in interface ISet
-
Return a set containing the members of this set excluding the specified value.
- removingAll(ISet<?>) - Method in interface IList
-
Return a list with the values from this list, in the same order, except that all instances of the specified values
are excluded.
- removingAll(ISet<?>) - Method in interface ISet
- removingFirst() - Method in interface IList
-
Return this list with the first element removed.
- removingLast() - Method in interface IList
-
Return this list with the last element removed.
- replacing(int, V) - Method in interface IList
-
Return a list with a new value for the specified element.
- replacingAll(int, int, Iterable<? extends V>) - Method in interface IList
-
Return a list with new values replacing the specified elements.
- reset() - Method in interface Builder
-
Remove all previously supplied elements.
- reset() - Method in interface MapBuilder
-
Remove all previously supplied bindings.
- reverse() - Method in interface IList
-
Return a list containing the same elements as this list, but in the reverse order.
S
- SetBuilder<V> - Interface in org.violetlib.collections
-
An interface for a set builder.
- singleton(K, V) - Static method in interface IMap
-
Return a map containing one binding.
- size() - Method in interface Builder
-
Return the number of elements that would be contained in the collection created in the current state.
- size() - Method in interface ICollection
-
Return the number of elements in the collection.
- size() - Method in interface IList
-
Return the number of elements in the list.
- size() - Method in interface IMap
-
Return the number of keys in the map.
- size() - Method in interface ISet
- size() - Method in interface MapBuilder
-
Return the number of bindings that would be contained in the map created in the current state.
- size() - Method in interface MapListBuilder
-
Return the number of keys with associated values.
- size() - Method in interface MapSetBuilder
-
Return the number of keys with associated values.
- sort() - Method in interface ICollection
-
Return a list containing the members of this collection, sorted in the natural sort order.
- sort(Comparator<? super V>) - Method in interface ICollection
-
Return a list containing the same elements as this collection, but sorted using the specified comparator.
- sort() - Method in interface IList
-
Return a list containing the same elements as this list, but sorted using the natural comparator.
- sort(Comparator<? super V>) - Method in interface IList
-
Return a list containing the same elements as this list, but sorted using the specified comparator.
- sort() - Method in interface UnorderedMapListBuilder
-
Return a map containing the keys bound to lists of values, sorted in the natural order.
- sort(Comparator<? super V>) - Method in interface UnorderedMapListBuilder
-
Return a map containing the keys bound to lists of values, sorted using the specified comparator.
- sort(KeyedValueSorter<K, V>) - Method in interface UnorderedMapListBuilder
-
Return a map containing the keys bound to lists of values, sorted using the specified set of key dependent
comparators.
- spliterator() - Method in interface ICollection
-
Return a Spliterator that yields the elements of the collection.
- spliterator() - Method in interface IList
- stream() - Method in interface ICollection
-
Return a stream of the elements of the collection.
- subset(ISet<K>) - Method in interface IMap
-
Return a map containing the bindings for the specified keys (if defined).
T
- toJavaArray(E[]) - Method in interface ICollection
-
Return a new Java array containing the elements of this collection.
- toJavaList() - Method in interface ICollection
-
Return a new Java list containing the elements of this collection, in the same order (if the collection defines an
order).
- toJavaList() - Method in interface IList
-
Return a new Java list containing the elements of this list, in the same order.
- toJavaSet() - Method in interface ICollection
-
Return a new Java set containing the elements of this collection.
- toJavaSet() - Method in interface IList
-
Return a new Java set containing the elements of this collection.
- toJavaUnmodifiableList() - Method in interface ICollection
-
Return a new unmodifiable Java list containing the elements of this collection, in the same order (if the
collection defines an order).
- toJavaUnmodifiableSet() - Method in interface ICollection
-
Return a new Java set containing the elements of this collection.
U
- UnorderedMapListBuilder<K,V> - Interface in org.violetlib.collections
-
Build an immutable map from keys of type K to immutable lists of values of type V.
V
- value() - Method in interface MapBuilder
-
Return a map containing the previously supplied (and not removed) bindings.
- value() - Method in interface MapListBuilder
-
Return a map containing the keys bound to lists of values.
- value() - Method in interface MapSetBuilder
-
Return a map containing the keys bound to sets of values.
- valueOf(String) - Static method in enum ListUsage
-
Returns the enum constant of this type with the specified name.
- values() - Method in interface Builder
-
Return a collection containing the previously supplied (and not removed) elements.
- values() - Method in interface IMap
- values() - Method in interface ListBuilder
-
Return a list containing the previously supplied (and not removed) elements.
- values() - Static method in enum ListUsage
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Method in interface SetBuilder
-
Return a set containing the previously supplied (and not removed) elements.
- visit(E) - Method in interface FindVisitor
- visit(Visitor<V>) - Method in interface ICollection
-
Visit each element of the collection.
- visit(Visitor<V>) - Method in interface IList
-
Visit each element of the list from the first element to the last element.
- visit(K, V) - Method in interface IMap.FVisitor
- visit(IMap.Visitor<K, V>) - Method in interface IMap
- visit(K, V) - Method in interface IMap.Visitor
- visit(int, V) - Method in interface IndexedFindVisitor
- visit(int, V) - Method in interface IndexedVisitor
- visit(E) - Method in interface Visitor
- Visitor<E> - Interface in org.violetlib.collections
-
A visitor of elements in a collection.