|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.tree.AbstractTreeNodeCollection
public abstract class AbstractTreeNodeCollection
Provides base functionality for a tree node collection.
Constructor Summary | |
---|---|
AbstractTreeNodeCollection()
|
Method Summary | |
---|---|
void |
add(int index,
ITreeNode child)
Add the given child at the given index. |
boolean |
add(ITreeNode child)
Add the given child. |
boolean |
addAll(ITreeNodeCollection collection)
Add the given collection to this. |
void |
clear()
Clear the children. |
Object |
clone()
Return a clone of this instance. |
boolean |
contains(ITreeNode treeNode)
Return true if this contains the given node. |
protected List |
deepClone(List list)
Create a new List which contains clones of the items in the
given list. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
ITreeNode |
get(int index)
Return the child at the given index. |
List |
getNodes()
|
int |
hashCode()
Returns a hash code value for the object. |
int |
indexOf(ITreeNode treeNode)
Return the index of the given node. |
boolean |
isEmpty()
Return true if this is empty. |
Iterator |
iterator()
Return an iterator over this collection. |
ITreeNode |
remove(int index)
Remove the object at the given index. |
boolean |
remove(ITreeNode child)
Remove the given child. |
ITreeNode |
set(int index,
ITreeNode child)
Set the given object at the given index. |
void |
setNodes(List nodes)
|
int |
size()
Return the size of this collection. |
ITreeNode[] |
toArray()
Return an array representation of this collection. |
ITreeNode[] |
toArray(ITreeNode[] nodes)
Return an array representation of this collection. |
String |
toString()
Return a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractTreeNodeCollection()
Method Detail |
---|
public boolean add(ITreeNode child)
add
in interface ITreeNodeCollection
public void add(int index, ITreeNode child)
add
in interface ITreeNodeCollection
public boolean addAll(ITreeNodeCollection collection)
addAll
in interface ITreeNodeCollection
public void clear()
clear
in interface ITreeNodeCollection
public Object clone()
clone
in interface ITreeNodeCollection
clone
in class Object
public boolean contains(ITreeNode treeNode)
contains
in interface ITreeNodeCollection
public boolean equals(Object object)
equals
in class Object
object
- The object to compare.public ITreeNode get(int index)
get
in interface ITreeNodeCollection
public List getNodes()
public int hashCode()
hashCode
in class Object
public int indexOf(ITreeNode treeNode)
indexOf
in interface ITreeNodeCollection
public boolean isEmpty()
isEmpty
in interface ITreeNodeCollection
public Iterator iterator()
iterator
in interface ITreeNodeCollection
public boolean remove(ITreeNode child)
remove
in interface ITreeNodeCollection
public ITreeNode remove(int index)
remove
in interface ITreeNodeCollection
public ITreeNode set(int index, ITreeNode child)
set
in interface ITreeNodeCollection
index
- Index.child
- Child to set.
public void setNodes(List nodes)
nodes
- the nodes to setpublic int size()
size
in interface ITreeNodeCollection
public ITreeNode[] toArray()
toArray
in interface ITreeNodeCollection
public ITreeNode[] toArray(ITreeNode[] nodes)
toArray
in interface ITreeNodeCollection
public String toString()
toString
in class Object
protected List deepClone(List list)
List
which contains clones of the items in the
given list.
list
- List to clone.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |