Package openllet.core.tracker
Class SimpleBranchEffectTracker
- java.lang.Object
-
- openllet.core.tracker.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
-
-
Constructor Summary
Constructors Constructor Description SimpleBranchEffectTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(int branch, openllet.aterm.ATermAppl a)Record that a _node is affected by a _branchSimpleBranchEffectTrackercopy()java.util.Set<openllet.aterm.ATermAppl>getAll(int branch)Retrieve _nodes affected by a _branch and all subsequent branchesjava.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.
-
-
-
Method Detail
-
add
public boolean add(int branch, openllet.aterm.ATermAppl a)Description copied from interface:BranchEffectTrackerRecord that a _node is affected by a _branch- Specified by:
addin interfaceBranchEffectTracker- Parameters:
branch- Branch integer identifiera- Node name- Returns:
- boolean
trueif effect not already noted for _branch+_node pair,falseelse
-
copy
public SimpleBranchEffectTracker copy()
- Specified by:
copyin interfaceBranchEffectTracker- Returns:
- a copy of branch tracker
-
getAll
public java.util.Set<openllet.aterm.ATermAppl> getAll(int branch)
Description copied from interface:BranchEffectTrackerRetrieve _nodes affected by a _branch and all subsequent branches- Specified by:
getAllin interfaceBranchEffectTracker- 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:BranchEffectTrackerRemove 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:
removein interfaceBranchEffectTracker- 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:BranchEffectTrackerRemove a branch and all subsequent branches from the tracker.- Specified by:
removeAllin interfaceBranchEffectTracker- Parameters:
branch- Branch integer identifier- Returns:
- Names of all _nodes affected by _branch and subsequent branches
-
-