Class SingletonAssociation

All Implemented Interfaces:
Serializable, Cloneable

final class SingletonAssociation extends AbstractAssociation
An instance of an association role containing at most one value. The majority of features types contain associations restricted to such [0 … 1] cardinality. While MultiValuedAssociation would be suitable to all cases, this SingletonAssociation consumes less memory.

Limitations

  • Multi-threading: SingletonAssociation instances are not thread-safe. Synchronization, if needed, shall be done externally by the caller.
Since:
0.5
Version:
0.6
See Also: