Class SimpleBranchEffectTracker

  • All Implemented Interfaces:
    BranchEffectTracker

    public class SimpleBranchEffectTracker
    extends java.lang.Object
    implements BranchEffectTracker

    Title: Simple Branch Effect Tracker

    Description: Basic ArrayList implementation of BranchEffectTracker

    Copyright: Copyright (c) 2008

    Company: Clark & Parsia, LLC.

    Author:
    Mike Smith
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(int branch, openllet.aterm.ATermAppl a)
      Record that a _node is affected by a _branch
      SimpleBranchEffectTracker copy()  
      java.util.Set<openllet.aterm.ATermAppl> getAll​(int branch)
      Retrieve _nodes affected by a _branch and all subsequent branches
      java.util.Set<openllet.aterm.ATermAppl> remove​(int branch)
      Remove a _branch from the tracker.
      java.util.Set<openllet.aterm.ATermAppl> removeAll​(int branch)
      Remove a branch and all subsequent branches from the tracker.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleBranchEffectTracker

        public SimpleBranchEffectTracker()
    • Method Detail

      • add

        public boolean add​(int branch,
                           openllet.aterm.ATermAppl a)
        Description copied from interface: BranchEffectTracker
        Record that a _node is affected by a _branch
        Specified by:
        add in interface BranchEffectTracker
        Parameters:
        branch - Branch integer identifier
        a - Node name
        Returns:
        boolean true if effect not already noted for _branch+_node pair, false else
      • getAll

        public java.util.Set<openllet.aterm.ATermAppl> getAll​(int branch)
        Description copied from interface: BranchEffectTracker
        Retrieve _nodes affected by a _branch and all subsequent branches
        Specified by:
        getAll in interface BranchEffectTracker
        Parameters:
        branch - Branch integer identifier
        Returns:
        Names of all _nodes affected by _branch and subsequent branches
      • remove

        public java.util.Set<openllet.aterm.ATermAppl> remove​(int branch)
        Description copied from interface: BranchEffectTracker
        Remove a _branch from the tracker. Note that this causes the _branch to effects association to change for all subsequent branches and should only be used if the _branch indices are changed in ABox and all other structures.
        Specified by:
        remove in interface BranchEffectTracker
        Parameters:
        branch - Branch integer identifier
        Returns:
        Names of all _nodes affected by _branch
      • removeAll

        public java.util.Set<openllet.aterm.ATermAppl> removeAll​(int branch)
        Description copied from interface: BranchEffectTracker
        Remove a branch and all subsequent branches from the tracker.
        Specified by:
        removeAll in interface BranchEffectTracker
        Parameters:
        branch - Branch integer identifier
        Returns:
        Names of all _nodes affected by _branch and subsequent branches