Class SingletonElement

All Implemented Interfaces:
Iterable<Element>, Collection<Element>, Set<Element>

final class SingletonElement extends AbstractSet<Element>
A mutable set containing either null or a single element. If more than one element is added, only the first one is kept. This is for use with StoredTree.toElements(AbstractParser, Collection, int) in the common case where we expect exactly one element.
Since:
1.1
Version:
1.1