T
- The type of the wrapped data of the tree node.public class SortedTreeModel<T> extends AbstractTreeModel<T> implements Comparable<T>
Constructor and Description |
---|
SortedTreeModel() |
Modifier and Type | Method and Description |
---|---|
TreeModel<T> |
addChild(T data)
An override which throws
IllegalArgumentException when given data is not null
and not an instance of Comparable . |
int |
compareTo(T object) |
protected Collection<TreeModel<T>> |
createChildren()
Returns a new
TreeSet . |
addChildNode, equals, getChildCount, getChildren, getData, getIndex, getLevel, getNextSibling, getParent, getPreviousSibling, hashCode, isFirst, isLast, isLeaf, isRoot, iterator, remove, setData, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected Collection<TreeModel<T>> createChildren()
TreeSet
.createChildren
in class AbstractTreeModel<T>
Collection
instance which should hold the tree's children.public TreeModel<T> addChild(T data)
IllegalArgumentException
when given data is not null
and not an instance of Comparable
. In other words, it only accepts null
or an instance of Comparable
.public int compareTo(T object)
compareTo
in interface Comparable<T>
Copyright © 2012–2018 OmniFaces. All rights reserved.