public class GenericTree<T,V extends GenericTree<T,V>> extends Object
| Constructor and Description | 
|---|
GenericTree()  | 
GenericTree(T data)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addChild(V child)  | 
void | 
addChildAt(int index,
          V child)  | 
void | 
addChildren(List<V> children)  | 
boolean | 
equals(Object o)  | 
V | 
getChildAt(int index)  | 
List<V> | 
getChildren()  | 
T | 
getData()  | 
List<V> | 
getLeafs()  | 
int | 
getNumberOfChildren()  | 
V | 
getParent()  | 
boolean | 
hasChildren()  | 
int | 
hashCode()  | 
boolean | 
isLeaf()  | 
boolean | 
isRoot()  | 
void | 
removeChild(V child)  | 
void | 
removeChildAt(int index)  | 
void | 
removeChildren()  | 
void | 
setChildren(List<V> children)  | 
void | 
setData(T data)  | 
void | 
setParent(V parent)  | 
String | 
toString()  | 
String | 
toStringVerbose()  | 
public GenericTree()
public GenericTree(T data)
public V getParent()
null if this
 tree is the root nodepublic List<V> getChildren()
public boolean isRoot()
public boolean isLeaf()
public int getNumberOfChildren()
public boolean hasChildren()
public void setChildren(List<V> children)
public void addChildren(List<V> children)
public void removeChild(V child)
public void addChildAt(int index, V child) throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionpublic void removeChildren()
public void removeChildAt(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionpublic V getChildAt(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionpublic String toStringVerbose()
 DL-Learner is licenced 						under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann