Class Singleton<E>

java.lang.Object
one.microstream.collections.Singleton<E>
Type Parameters:
E - the type of elements in this collection
All Implemented Interfaces:
Iterable<E>, Consumer<E>, CapacityCarrying, ExtendedBag<E>, ExtendedCollection<E>, ExtendedList<E>, ExtendedSequence<E>, ReleasingCollection<E>, Sized, Sortable<E>, XGettingBag<E>, XGettingCollection<E>, XGettingEnum<E>, XGettingList<E>, XGettingSequence<E>, XGettingSet<E>, XIndexIterable<E>, XIterable<E>, XJoinable<E>, XOrderingEnum<E>, XOrderingSequence<E>, XReference<E>, XReferencing<E>, XReplacingBag<E>, XReplacingCollection<E>, XSettingList<E>, XSettingSequence<E>, XSortableEnum<E>, XSortableSequence<E>, Reference<E>, Referencing<E>, Copyable
Direct Known Subclasses:
LinkReference.Default

public class Singleton<E>
extends Object
implements XReference<E>
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:
Constant