public abstract static class DescriptorEntitySet.ExpressionEntitySetBase<X extends Axiom.ExpressionEntity<S,A>,S extends org.semanticweb.owlapi.model.OWLProperty,A> extends DescriptorEntitySet.EntitySetBase<X> implements Axiom.ExpressionEntitySet<X,A>
ExpressionEntitySet
.
It implements common methods to be used to manage a set of EntitySet.
In particular, it define the method of adding and removing set of
data or object properties values with the same expression. Also,
it enables obtaining the actual value of a property.
Constructors and HashSet
management are based
on DescriptorEntitySet.EntitySetBase
.
Axiom.ExpressionEntitySet.SynchronisationMultiIntent<E extends Axiom.ExpressionEntity<?,Y>,Y>, Axiom.ExpressionEntitySet.SynchroniseContainedIntent<F extends Axiom.ExpressionEntity<?,Y>,Y>
Axiom.EntitySet.SynchronisationIntent<E>
singleton
Constructor and Description |
---|
ExpressionEntitySetBase() |
ExpressionEntitySetBase(java.util.Collection<? extends X> c) |
ExpressionEntitySetBase(int initialCapacity) |
ExpressionEntitySetBase(int initialCapacity,
float loadFactor) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(X dataSemantic)
This method modifies the standard adding procedure to a set
by looking if the
ExpressionEntitySet already contains
the semantic (i.e.: data or object property) specified in the
input parameter. |
A |
getLink(S semantic)
Searches in the
ExpressionEntity for the given property and
returns one of its values. |
Axiom.EntitySet<A> |
getLinks(S semantic)
Searches in the
ExpressionEntity for the given property and
returns all its values. |
boolean |
remove(java.lang.Object o)
It removes an entri from the
ExpressionEntitySet . |
java.lang.String |
toString() |
isSingleton, setSingleton
clear, clone, contains, isEmpty, iterator, size, spliterator
addAll, containsAll, retainAll, toArray, toArray
finalize, getClass, notify, notifyAll, wait, wait, wait
synchroniseFrom, synchroniseTo
isSingleton, setSingleton
public ExpressionEntitySetBase()
public ExpressionEntitySetBase(java.util.Collection<? extends X> c)
public ExpressionEntitySetBase(int initialCapacity, float loadFactor)
public ExpressionEntitySetBase(int initialCapacity)
public Axiom.EntitySet<A> getLinks(S semantic)
ExpressionEntity
for the given property and
returns all its values.semantic
- the properties to look for.empty
HashSet
if the values is not available.public A getLink(S semantic)
ExpressionEntity
for the given property and
returns one of its values. It should be used with a EntitySet#isSingleton()
axioms, since other values are ignored.semantic
- the properties to look for.null
if the values is not available.public boolean add(X dataSemantic)
ExpressionEntitySet
already contains
the semantic (i.e.: data or object property) specified in the
input parameter. If this is true the given value are added
to the related ExpressionEntity#getValues()
. Otherwise
the given object is added as a new element.
Note that if the input parameter describes a singleton
object all the previous contents related to that semantic
are deleted.add
in interface java.util.Collection<X extends Axiom.ExpressionEntity<S,A>>
add
in interface java.util.Set<X extends Axiom.ExpressionEntity<S,A>>
add
in class java.util.HashSet<X extends Axiom.ExpressionEntity<S,A>>
dataSemantic
- the new semantic to add.true
if this collection changed as a result of the call.public boolean remove(java.lang.Object o)
ExpressionEntitySet
.
The input parameter cna be ether the object describing the
ExpressionEntity
with a specific semantic and values
to be removed. Or it can a property. For the latter,
all the values are deleted.remove
in interface java.util.Collection<X extends Axiom.ExpressionEntity<S,A>>
remove
in interface java.util.Set<X extends Axiom.ExpressionEntity<S,A>>
remove
in class java.util.HashSet<X extends Axiom.ExpressionEntity<S,A>>
o
- the object to be removed.true
if the set contained the specified element.public java.lang.String toString()
toString
in class DescriptorEntitySet.EntitySetBase<X extends Axiom.ExpressionEntity<S,A>>