E - the type of owl objects in the nodepublic abstract class DefaultNodeSet<E extends OWLObject> extends Object implements NodeSet<E>
| Constructor and Description | 
|---|
| DefaultNodeSet()constructor for an empty node set. | 
| DefaultNodeSet(E entity) | 
| DefaultNodeSet(Node<E> node) | 
| DefaultNodeSet(Set<Node<E>> nodes) | 
| DefaultNodeSet(Stream<Node<E>> nodes) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAllNodes(Collection<Node<E>> nodeset)Adds a collection of  Nodes to this set. | 
| void | addAllNodes(Stream<Node<E>> nodeset)Adds a collection of  Nodes to this set. | 
| void | addDifferentEntities(Set<E> entities)Adds the specified entities as  Nodes to this set. | 
| void | addEntity(E entity)Adds an entity to this  NodeSetby wrapping it in aNode. | 
| void | addNode(Node<E> node)Adds a  Nodeto this set. | 
| void | addSameEntities(Set<E> entities)Adds the set of entities as a  Nodeto this set. | 
| boolean | containsEntity(E e)A convenience method that determines if this  NodeSetcontains a specific entity. | 
| Stream<E> | entities()A convenience method that gets all of the entities contained in the  Nodesin thisNodeSet. | 
| boolean | equals(Object obj) | 
| int | hashCode() | 
| boolean | isBottomSingleton()Determines if this  NodeSetis a singleton that only contains the bottom node (in a
 hierarchy). | 
| boolean | isEmpty() | 
| boolean | isSingleton()Determines if this  NodeSetis a singleton. | 
| boolean | isTopSingleton()Determines if this  NodeSetis a singleton node that only contains the top node (in a
 hierarchy). | 
| Iterator<Node<E>> | iterator() | 
| Stream<Node<E>> | nodes()Gets the  Nodes contained in thisNodeSet. | 
| String | toString() | 
getFlattened, getNodesforEach, spliteratorpublic DefaultNodeSet()
public DefaultNodeSet(E entity)
entity - the entity to be containedpublic DefaultNodeSet(Set<Node<E>> nodes)
nodes - a set of nodes to be containedpublic Stream<Node<E>> nodes()
NodeSetNodes contained in this NodeSet.public void addEntity(E entity)
NodeSet by wrapping it in a Node.entity - The entity to be added. The entity will be wrapped in the Node and the
 Node added to this set. Must not be null.NullPointerException - if entity is null.public void addNode(Node<E> node)
Node to this set.node - The Node to be added.NullPointerException - if entity is null.public void addAllNodes(Collection<Node<E>> nodeset)
Nodes to this set.nodeset - The Nodes to be added. Note that if the collection is not a set then
 duplicate Nodes will be filtered out.public void addAllNodes(Stream<Node<E>> nodeset)
Nodes to this set.nodeset - The Nodes to be added. Note that if the collection is not a set then
 duplicate Nodes will be filtered out.public void addSameEntities(Set<E> entities)
Node to this set.entities - The set of entities to be added. The entities will be wrapped in a Node which will be added to this NodeSet.public void addDifferentEntities(Set<E> entities)
Nodes to this set.entities - The entities to be added. Each entity will be wrapped in a Node which
 will then be added to this NodeSet.public Stream<E> entities()
NodeSetNodes in this
 NodeSet.public boolean isEmpty()
public boolean containsEntity(E e)
NodeSetNodeSet contains a specific entity.containsEntity in interface NodeSet<E extends OWLObject>e - The entity to test fortrue if this NodeSet contains a Node that contains the
         entity, e, and false if this NodeSet does not contain a
         Node that contains the entity, e.public boolean isSingleton()
NodeSetNodeSet is a singleton. A NodeSet is a singleton if it
 contains only one Node.isSingleton in interface NodeSet<E extends OWLObject>true if this NodeSet is a singleton, otherwise false.public boolean isTopSingleton()
NodeSetNodeSet is a singleton node that only contains the top node (in a
 hierarchy).isTopSingleton in interface NodeSet<E extends OWLObject>true if this NodeSet is a singleton that contains only the top node,
         and false otherwise.Node.isTopNode()public boolean isBottomSingleton()
NodeSetNodeSet is a singleton that only contains the bottom node (in a
 hierarchy).isBottomSingleton in interface NodeSet<E extends OWLObject>true if this NodeSet is a singleton that only contains a node that is
         the bottom node, otherwise falseNode.isBottomNode()Copyright © 2021 The University of Manchester. All rights reserved.