Class Constant<E>

java.lang.Object
one.microstream.collections.Constant<E>
Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>, CapacityCarrying, ExtendedBag<E>, ExtendedCollection<E>, ExtendedList<E>, ExtendedSequence<E>, Sized, XGettingBag<E>, XGettingCollection<E>, XGettingEnum<E>, XGettingList<E>, XGettingSequence<E>, XGettingSet<E>, XImmutableBag<E>, XImmutableCollection<E>, XImmutableEnum<E>, XImmutableList<E>, XImmutableSequence<E>, XImmutableSet<E>, XIndexIterable<E>, XIterable<E>, XJoinable<E>, XReferencing<E>, ThreadSafe, HashImmutable, Referencing<E>, Copyable, Immutable
Direct Known Subclasses:
LinkingReferencing.Default

public class Constant<E>
extends Object
implements XImmutableList<E>, XImmutableEnum<E>, XReferencing<E>
Immutable singleton dummy collection used to pass a single instance masked as a collection.

As there is always only one element, this type can be a List and a Set (Enum) at the same time, enabling it to be used in any type situation.

See Also:
Singleton