PersistentCollection
A generic persistent collection of elements that supports adding and removing elements.
Modification operations return new instances of the persistent collection with the modification applied.
Type Parameters
the type of elements contained in the collection. The persistent collection is covariant on its element type.
Inheritors
Types
A generic builder of the persistent collection. Builder exposes its modification operations through the MutableCollection interface.
Functions
Returns a new persistent collection with elements of the specified elements collection added, or this instance if no modifications were made in the result of this operation.
Returns a new builder with the same contents as this collection.
Returns an empty persistent collection.
Returns a new persistent set with elements in this collection that are also contained in the specified elements collection.
Returns a new persistent collection with a single appearance of the specified element removed, or this instance if there is no such element in this collection.
Returns a new persistent collection containing all elements of this collection except the elements contained in the specified elements array, or this instance if there are no elements to remove.
Returns a new persistent collection containing all elements of this collection except the elements contained in the specified elements collection, or this instance if there are no elements to remove.
Returns a new persistent collection containing all elements of this collection except the elements contained in the specified elements sequence, or this instance if there are no elements to remove.
Returns a new persistent collection with the specified element added, or this instance if this collection does not support duplicates and it already contains the element.
Returns a new persistent collection with elements of the specified elements array added, or this instance if no modifications were made in the result of this operation.
Returns a new persistent collection with elements of the specified elements collection added, or this instance if no modifications were made in the result of this operation.
Returns a new persistent collection with elements of the specified elements sequence added, or this instance if no modifications were made in the result of this operation.
Returns a new persistent collection with elements matching the specified predicate removed, or this instance if no elements match the predicate.
Returns a new persistent collection containing all elements of this collection except the elements contained in the specified elements collection, or this instance if there are no elements to remove.
Returns a new persistent collection with elements in this collection that are also contained in the specified elements collection, or this instance if no modifications were made in the result of this operation.