org.semanticweb.owlapi.reasoner.impl
Class NodeSetImpl<E extends OWLLogicalEntity>

java.lang.Object
  extended by org.semanticweb.owlapi.reasoner.impl.NodeSetImpl<E>
All Implemented Interfaces:
java.lang.Iterable<Node<E>>, NodeSet<E>

public class NodeSetImpl<E extends OWLLogicalEntity>
extends java.lang.Object
implements NodeSet<E>

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 04-Dec-2009


Method Summary
 boolean containsEntity(E e)
          A convenience method that determines if this NodeSet contains a specific entity.
 NodeSet<E> createSingleton(E entity)
           
 NodeSet<E> createSingleton(Node<E> node)
           
 java.util.Set<E> getFlattened()
          A convenience method that gets all of the entities contained in the Nodes in this NodeSet.
 boolean isBottomSingleton()
          Determies if this NodeSet is a singleton that only contains the bottom node (in a hierarchy).
 boolean isEmpty()
           
 boolean isSingleton()
          Determines if this NodeSet is a singleton.
 boolean isTopSingleton()
          Determines if this NodeSet is a singleton node that only contains the top node (in a hierarchy).
 java.util.Iterator<Node<E>> iterator()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSingleton

public NodeSet<E> createSingleton(E entity)

createSingleton

public NodeSet<E> createSingleton(Node<E> node)

getFlattened

public java.util.Set<E> getFlattened()
Description copied from interface: NodeSet
A convenience method that gets all of the entities contained in the Nodes in this NodeSet.

Specified by:
getFlattened in interface NodeSet<E extends OWLLogicalEntity>
Returns:
The union of the entities contained in the Nodes in this NodeSet.

containsEntity

public boolean containsEntity(E e)
Description copied from interface: NodeSet
A convenience method that determines if this NodeSet contains a specific entity.

Specified by:
containsEntity in interface NodeSet<E extends OWLLogicalEntity>
Parameters:
e - The entity to test for
Returns:
true 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.

isSingleton

public boolean isSingleton()
Description copied from interface: NodeSet
Determines if this NodeSet is a singleton. A NodeSet is a singleton if it contains only one Node.

Specified by:
isSingleton in interface NodeSet<E extends OWLLogicalEntity>
Returns:
true if this NodeSet is a singleton, otherwise false.

isTopSingleton

public boolean isTopSingleton()
Description copied from interface: NodeSet
Determines if this NodeSet is a singleton node that only contains the top node (in a hierarchy).

Specified by:
isTopSingleton in interface NodeSet<E extends OWLLogicalEntity>
Returns:
true if this NodeSet is a singleton that contains only the top node, and false otherwise.
See Also:
Node#isTopNode()}

isBottomSingleton

public boolean isBottomSingleton()
Description copied from interface: NodeSet
Determies if this NodeSet is a singleton that only contains the bottom node (in a hierarchy).

Specified by:
isBottomSingleton in interface NodeSet<E extends OWLLogicalEntity>
Returns:
true if this NodeSet is a singleton that only contains a node that is the bottom node, otherwise false
See Also:
Node#isBottomNode()}

size

public int size()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface NodeSet<E extends OWLLogicalEntity>

iterator

public java.util.Iterator<Node<E>> iterator()
Specified by:
iterator in interface java.lang.Iterable<Node<E extends OWLLogicalEntity>>