Package org.djutils.immutablecollections
Contains a set of immutable collection interfaces and wrapper implementations. Two versions of immutable collections are
implemented:
- A version, identified by Immutable.COPY, where the immutable collection can neither be changed by any object "using" the ImmutableCollection nor anymore by objects that have a pointer to the collection, as an internal (shallow) copy is made of the collection. This is the default implementation.
- A version, identified by Immutable.WRAP, where the immutable collection can not be changed by any object "using" the ImmutableCollection, but it can still be changed by any object that has a pointer to the original collection that is "wrapped". Instead of a (shallow) copy of the collection, a pointer to the collection is stored.
Copyright (c) 2016-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Interface Summary Interface Description ImmutableCollection<E> A Collection interface without the methods that can change it.ImmutableList<E> A List interface without the methods that can change it.ImmutableMap<K,V> A Map interface without the methods that can change it.ImmutableNavigableMap<K,V> AImmutableSortedMap
extended with navigation methods reporting closest matches for given search targets.ImmutableNavigableSet<E> AImmutableSortedSet
extended with navigation methods reporting closest matches for given search targets.ImmutableSet<E> A Set interface without the methods that can change it.ImmutableSortedMap<K,V> A SortedMap interface without the methods that can change it.ImmutableSortedSet<E> A SortedSet interface without the methods that can change it. -
Class Summary Class Description ImmutableAbstractCollection<E> An abstract base class for an immutable wrapper for a Set.ImmutableAbstractList<E> An abstract base class for an immutable wrapper for a List.ImmutableAbstractMap<K,V> An abstract base class for an immutable wrapper for a Map.ImmutableAbstractSet<E> An abstract base class for an immutable wrapper for a Set.ImmutableArrayList<E> An immutable wrapper for an ArrayList.ImmutableCollections Static methods operating on immutable collections, or a mix of an immutable collection and a mutable collection.ImmutableHashMap<K,V> An immutable wrapper for a HashMap.ImmutableHashSet<E> An immutable wrapper for a HashSet.ImmutableIterator<E> An immutable iterator over elements, wrapping a "mutable" iterator.ImmutableLinkedHashMap<K,V> An immutable wrapper for a LinkedHashMap.ImmutableLinkedHashSet<E> An immutable wrapper for a LinkedHashSet.ImmutableMap.ImmutableEntry<K,V> A map entry (key-value pair).ImmutableTreeMap<K,V> An immutable wrapper for a TreeMap.ImmutableTreeSet<E> An immutable wrapper for a TreeSet.ImmutableVector<E> An immutable wrapper for a Vector. -
Enum Summary Enum Description Immutable Indicate whether the immutable collection contains a COPY of the collection (neither changeable by the user of the immutable collection, nor by anyone holding a pointer to the original collection), or a WRAP for the original collection (not changeable by the user of the immutable collection, but can be changed by anyone holding a pointer to the original collection that is wrapped).