|
||||||||||
| 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 ITreeNodeCollectionpublic boolean addAll(ITreeNodeCollection collection)
addAll in interface ITreeNodeCollectionpublic void clear()
clear in interface ITreeNodeCollectionpublic Object clone()
clone in interface ITreeNodeCollectionclone in class Objectpublic boolean contains(ITreeNode treeNode)
contains in interface ITreeNodeCollectionpublic boolean equals(Object object)
equals in class Objectobject - The object to compare.public ITreeNode get(int index)
get in interface ITreeNodeCollectionpublic List getNodes()
public int hashCode()
hashCode in class Objectpublic int indexOf(ITreeNode treeNode)
indexOf in interface ITreeNodeCollectionpublic boolean isEmpty()
isEmpty in interface ITreeNodeCollectionpublic Iterator iterator()
iterator in interface ITreeNodeCollectionpublic boolean remove(ITreeNode child)
remove in interface ITreeNodeCollectionpublic ITreeNode remove(int index)
remove in interface ITreeNodeCollection
public ITreeNode set(int index,
ITreeNode child)
set in interface ITreeNodeCollectionindex - Index.child - Child to set.
public void setNodes(List nodes)
nodes - the nodes to setpublic int size()
size in interface ITreeNodeCollectionpublic ITreeNode[] toArray()
toArray in interface ITreeNodeCollectionpublic ITreeNode[] toArray(ITreeNode[] nodes)
toArray in interface ITreeNodeCollectionpublic String toString()
toString in class Objectprotected 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 |