Class DefaultNodeSet<E extends OWLObject>
java.lang.Object
org.semanticweb.owlapi.reasoner.impl.DefaultNodeSet<E>
- Type Parameters:
E
- the type of owl objects in the node
- Direct Known Subclasses:
OWLClassNodeSet
,OWLDataPropertyNodeSet
,OWLDatatypeNodeSet
,OWLNamedIndividualNodeSet
,OWLObjectPropertyNodeSet
- Since:
- 3.0.0
- Author:
- Matthew Horridge, The University of Manchester, Information Management Group
-
Constructor Summary
ConstructorsConstructorDescriptionconstructor for an empty node set.DefaultNodeSet
(E entity) DefaultNodeSet
(Set<Node<E>> nodes) DefaultNodeSet
(Stream<Node<E>> nodes) DefaultNodeSet
(Node<E> node) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllNodes
(Collection<Node<E>> nodeset) Adds a collection ofNode
s to this set.void
addAllNodes
(Stream<Node<E>> nodeset) Adds a collection ofNode
s to this set.void
addDifferentEntities
(Set<E> entities) Adds the specified entities asNode
s to this set.void
Adds an entity to thisNodeSet
by wrapping it in aNode
.void
Adds aNode
to this set.void
addSameEntities
(Set<E> entities) Adds the set of entities as aNode
to this set.boolean
containsEntity
(E e) entities()
boolean
int
hashCode()
boolean
boolean
isEmpty()
boolean
boolean
iterator()
nodes()
toString()
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.semanticweb.owlapi.reasoner.NodeSet
getFlattened, getNodes
-
Constructor Details
-
DefaultNodeSet
public DefaultNodeSet()constructor for an empty node set. -
DefaultNodeSet
- Parameters:
entity
- the entity to be contained
-
DefaultNodeSet
- Parameters:
node
- the node to be contained
-
DefaultNodeSet
- Parameters:
nodes
- a set of nodes to be contained
-
DefaultNodeSet
- Parameters:
nodes
- a set of nodes to be contained
-
-
Method Details
-
nodes
-
addEntity
Adds an entity to thisNodeSet
by wrapping it in aNode
.- Parameters:
entity
- The entity to be added. The entity will be wrapped in theNode
and theNode
added to this set. Must not benull
.- Throws:
NullPointerException
- ifentity
isnull
.
-
addNode
Adds aNode
to this set.- Parameters:
node
- TheNode
to be added.- Throws:
NullPointerException
- ifentity
isnull
.
-
addAllNodes
Adds a collection ofNode
s to this set.- Parameters:
nodeset
- TheNode
s to be added. Note that if the collection is not a set then duplicateNode
s will be filtered out.
-
addAllNodes
Adds a collection ofNode
s to this set.- Parameters:
nodeset
- TheNode
s to be added. Note that if the collection is not a set then duplicateNode
s will be filtered out.
-
addSameEntities
Adds the set of entities as aNode
to this set.- Parameters:
entities
- The set of entities to be added. The entities will be wrapped in aNode
which will be added to thisNodeSet
.
-
addDifferentEntities
Adds the specified entities asNode
s to this set.- Parameters:
entities
- The entities to be added. Each entity will be wrapped in aNode
which will then be added to thisNodeSet
.
-
entities
-
isEmpty
public boolean isEmpty() -
containsEntity
- Specified by:
containsEntity
in interfaceNodeSet<E extends OWLObject>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceNodeSet<E extends OWLObject>
-
isTopSingleton
public boolean isTopSingleton()- Specified by:
isTopSingleton
in interfaceNodeSet<E extends OWLObject>
-
isBottomSingleton
public boolean isBottomSingleton()- Specified by:
isBottomSingleton
in interfaceNodeSet<E extends OWLObject>
-
iterator
-
toString
-
equals
-
hashCode
public int hashCode()
-