|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.fractal.julia.loader.Tree
public class Tree
An immutable string tree.
Constructor Summary | |
---|---|
Tree(String leaf)
Constructs a new Tree instance. |
|
Tree(Tree[] subTrees)
Constructs a new Tree instance. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Tests if this tree is equal to the given object. |
int |
equals(String str,
int off,
int len)
Test if the String representation of this tree is equal to the given String. |
int |
getSize()
Returns the number of sub trees of this tree. |
Tree |
getSubTree(int index)
Returns the sub tree of this tree whose index is given. |
Tree[] |
getSubTrees()
Returns the sub trees of this tree. |
Tree |
getValue(String key)
Return the value associated to the given key. |
int |
hashCode()
Returns the hashcode of this tree. |
String |
toString()
Returns a string representation of this tree. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Tree(String leaf)
Tree
instance.
leaf
- the value of the node to be created.public Tree(Tree[] subTrees)
Tree
instance.
subTrees
- the subtrees of the node to be created, or null
for a leaf node.Method Detail |
---|
public int getSize()
public Tree getSubTree(int index)
index
- the index of the sub tree to be returned.
ArrayIndexOutOfBoundsException
- if index is
negative or strictly greater than getSize
.public Tree[] getSubTrees()
public Tree getValue(String key)
key
- a key
public boolean equals(Object o)
equals
in class Object
o
- the object to be compared to this tree.
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public int equals(String str, int off, int len)
str
- a String.off
- the start index of the String to be compared to this tree in
str;len
- the length of the String to be compared to this tree.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |