tom.library.sl
Class VisitableBuiltin<T>

java.lang.Object
  extended by tom.library.sl.VisitableBuiltin<T>
All Implemented Interfaces:
Visitable

public class VisitableBuiltin<T>
extends Object
implements Visitable


Constructor Summary
VisitableBuiltin(T builtin)
           
 
Method Summary
 T getBuiltin()
           
 Visitable getChildAt(int index)
          Returns the child at the specified position
 int getChildCount()
          Returns the number of children of the current Visitable
 Visitable[] getChildren()
          Returns the list of (non builtin) Visitable children
 Visitable setChildAt(int index, Visitable v)
          Replaces a child at the specified position
 Visitable setChildren(Visitable[] childs)
          Replaces all children of any visitable at once, and returns this visitable.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VisitableBuiltin

public VisitableBuiltin(T builtin)
Method Detail

getBuiltin

public T getBuiltin()

getChildCount

public int getChildCount()
Description copied from interface: Visitable
Returns the number of children of the current Visitable

Specified by:
getChildCount in interface Visitable
Returns:
the number of children

getChildAt

public Visitable getChildAt(int index)
Description copied from interface: Visitable
Returns the child at the specified position

Specified by:
getChildAt in interface Visitable
Parameters:
index - index of the element to return
Returns:
the child at the specified position in the list

setChildAt

public Visitable setChildAt(int index,
                            Visitable v)
Description copied from interface: Visitable
Replaces a child at the specified position

Specified by:
setChildAt in interface Visitable
Parameters:
index - index of the element to return
v - element to set up
Returns:
the current Visitable

setChildren

public Visitable setChildren(Visitable[] childs)
Description copied from interface: Visitable
Replaces all children of any visitable at once, and returns this visitable.

Specified by:
setChildren in interface Visitable
Parameters:
childs - array of children to set up
Returns:
the current Visitable

getChildren

public Visitable[] getChildren()
Description copied from interface: Visitable
Returns the list of (non builtin) Visitable children

Specified by:
getChildren in interface Visitable
Returns:
an array of Visitable children

toString

public String toString()
Overrides:
toString in class Object