edu.ksu.cis.projects.bogor.ast
Class LiveSet

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.ast.Node
      extended by edu.ksu.cis.projects.bogor.ast.LiveSet
All Implemented Interfaces:
Disposable, Serializable, Cloneable

public final class LiveSet
extends Node

Live set AST.

Version:
CVS $Revision: 1.7 $ $Date: 2005/05/06 17:25:17 $
Author:
Robby
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node
ILLEGAL_LOCAL_ID_CHAR
 
Constructor Summary
LiveSet(List<String> ids)
          Default constructor.
 
Method Summary
 LiveSet clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Removes references to parent and ids.
 String getId(int index)
          Gets an id at the specified index.
 int getIdCount()
          Gets the number of ids.
 Location getParent()
          Gets the parent of this object.
 void setIds(List<String> newIds)
          Sets the ids.
 void setParent(Location newParent)
          Sets the parent of this object.
 String toString()
          Returns the string representation of this object.
 void visit(ASTVisitor visitor)
           
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node
getLocationInfo, getProperty, putProperty, setLocationInfo
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiveSet

public LiveSet(List<String> ids)
Default constructor.

Parameters:
ids - The ids. Must be non-null. Each element must be instance of String.
Method Detail

getId

public String getId(int index)
Gets an id at the specified index.

Parameters:
index - The index of the id. Must be between 0 and getIdCount() - 1, inclusive.
Returns:
The id at the specified index. Non-null.

getIdCount

public int getIdCount()
Gets the number of ids.

Returns:
The number of ids.

setIds

public void setIds(List<String> newIds)
Sets the ids.

Parameters:
newIds - The new ids. Must be non-null. Each element must be instance of String.

setParent

public void setParent(Location newParent)
Sets the parent of this object.

Parameters:
newParent - The new parent. Must be non-null.

getParent

public Location getParent()
Gets the parent of this object.

Returns:
The parent of this object.

clone

public LiveSet clone()
Clones this object (deep clone); including location info.

Specified by:
clone in class Node
Returns:
The clone of this object. Non-null.

dispose

public void dispose()
Removes references to parent and ids. Once called, avoid using this object.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class Node

toString

public String toString()
Returns the string representation of this object.

Specified by:
toString in class Node
Returns:
Returns "live { ( , ids )* }"

visit

public void visit(ASTVisitor visitor)
Specified by:
visit in class Node