Interface NodeSet<E extends OWLObject>

Type Parameters:
E - the type of elements in the node set
All Superinterfaces:
Iterable<Node<E>>
All Known Implementing Classes:
DefaultNodeSet, OWLClassNodeSet, OWLDataPropertyNodeSet, OWLDatatypeNodeSet, OWLNamedIndividualNodeSet, OWLObjectPropertyNodeSet

public interface NodeSet<E extends OWLObject> extends Iterable<Node<E>>
A set of Nodes.
Since:
3.0.0
Author:
Matthew Horridge, The University of Manchester, Information Management Group
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    A convenience method that determines if this NodeSet contains a specific entity.
    A convenience method that gets all of the entities contained in the Nodes in this NodeSet.
    default Set<E>
    A convenience method that gets all of the entities contained in the Nodes in this NodeSet.
    default Set<Node<E>>
    Gets the Nodes contained in this NodeSet.
    boolean
    Determines if this NodeSet is a singleton that only contains the bottom node (in a hierarchy).
    boolean
     
    boolean
    Determines if this NodeSet is a singleton.
    boolean
    Determines if this NodeSet is a singleton node that only contains the top node (in a hierarchy).
    Gets the Nodes contained in this NodeSet.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • getFlattened

      default Set<E> getFlattened()
      A convenience method that gets all of the entities contained in the Nodes in this NodeSet.
      Returns:
      The union of the entities contained in the Nodes in this NodeSet. The set that is returned is a copy; modifications to the returned set will not be reflected in this object.
    • entities

      Stream<E> entities()
      A convenience method that gets all of the entities contained in the Nodes in this NodeSet.
      Returns:
      The union of the entities contained in the Nodes in this NodeSet.
    • isEmpty

      boolean isEmpty()
      Returns:
      true if the node set is empty
    • containsEntity

      boolean containsEntity(E e)
      A convenience method that determines if this NodeSet contains a specific entity.
      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

      boolean isSingleton()
      Determines if this NodeSet is a singleton. A NodeSet is a singleton if it contains only one Node.
      Returns:
      true if this NodeSet is a singleton, otherwise false.
    • isTopSingleton

      boolean isTopSingleton()
      Determines if this NodeSet is a singleton node that only contains the top node (in a hierarchy).
      Returns:
      true if this NodeSet is a singleton that contains only the top node, and false otherwise.
      See Also:
    • isBottomSingleton

      boolean isBottomSingleton()
      Determines if this NodeSet is a singleton that only contains the bottom node (in a hierarchy).
      Returns:
      true if this NodeSet is a singleton that only contains a node that is the bottom node, otherwise false
      See Also:
    • getNodes

      default Set<Node<E>> getNodes()
      Gets the Nodes contained in this NodeSet.
      Returns:
      The set of Nodes contained in this NodeSet. The set that is returned is a copy; modifications to the returned set will not be reflected in this object.
    • nodes

      Stream<Node<E>> nodes()
      Gets the Nodes contained in this NodeSet.
      Returns:
      stream of Nodes contained in this NodeSet.