T
- the type of the axiom to collect.public static class MORAxioms.AxiomsBase<T> extends java.util.HashSet<T> implements Semantic.Axioms<T>
MORAxioms
that extends Semantic.Axioms
or Semantic.SemanticAxioms
.
This class implements common features for managing an HashSet
and a singleton
value
for Semantic.Axioms
.
Semantic.Axioms.SynchronisationIntent<E>
Modifier and Type | Field and Description |
---|---|
protected boolean |
singleton
the actual singleton flagging value.
|
Constructor and Description |
---|
AxiomsBase()
Instanciate this
Semantic.Axioms as an empty HashSet . |
AxiomsBase(int initialCapacity)
Instanciate this
Semantic.Axioms as a HashSet with a given initial size. |
AxiomsBase(int initialCapacity,
float loadFactor)
Instanciate this
Semantic.Axioms as a HashSet with a given initial size and load factor. |
AxiomsBase(java.util.Collection<? extends T> c)
Instanciate this
Semantic.Axioms as a HashSet containing the given value. |
Modifier and Type | Method and Description |
---|---|
boolean |
isSingleton()
Describes if this set should contain a single element.
|
void |
setSingleton(boolean singleton)
Set this set to contain a single element.
|
java.lang.String |
toString() |
addAll, containsAll, retainAll, toArray, toArray
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator
finalize, getClass, notify, notifyAll, wait, wait, wait
synchroniseFrom, synchroniseTo
protected boolean singleton
false
.public AxiomsBase()
public AxiomsBase(int initialCapacity)
Semantic.Axioms
as a HashSet
with a given initial size.
It is not set to be singleton
.initialCapacity
- the initial capacity of the axioms HashSet
.public AxiomsBase(int initialCapacity, float loadFactor)
Semantic.Axioms
as a HashSet
with a given initial size and load factor.
It is not set to be singleton
.initialCapacity
- the initial capacity of the axioms HashSet
.loadFactor
- the load factor of the axioms HashSet
public AxiomsBase(java.util.Collection<? extends T> c)
Semantic.Axioms
as a HashSet
containing the given value.
It is not set to be singleton
.c
- the element with wich setGround the set of Semantic.Axioms
.public boolean isSingleton()
Semantic.Axioms
isSingleton
in interface Semantic.Axioms<T>
true
if this is a singleton set, false
otherwise.public void setSingleton(boolean singleton)
Semantic.Axioms
setSingleton
in interface Semantic.Axioms<T>
singleton
- true
if this is a singleton set, false
otherwise.public java.lang.String toString()
toString
in class java.util.AbstractCollection<T>