com.clarkparsia.pellet.impl
Class SimpleBranchEffectTracker

java.lang.Object
  extended by com.clarkparsia.pellet.impl.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
SimpleBranchEffectTracker()
           
 
Method Summary
 boolean add(int branch, aterm.ATermAppl a)
          Record that a node is affected by a branch
 SimpleBranchEffectTracker copy()
          Copy branch tracker
 java.util.Set<aterm.ATermAppl> getAll(int branch)
          Retrieve nodes affected by a branch and all subsequent branches
 java.util.Set<aterm.ATermAppl> remove(int branch)
          Remove a branch from the tracker.
 java.util.Set<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,
                   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

copy

public SimpleBranchEffectTracker copy()
Description copied from interface: BranchEffectTracker
Copy branch tracker

Specified by:
copy in interface BranchEffectTracker

getAll

public java.util.Set<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<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<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


Copyright © 2004 Evren Sirin. All Rights Reserved.