Class DefaultTreeTable.Node.Children
java.lang.Object
java.util.AbstractCollection<TreeTable.Node>
java.util.AbstractList<TreeTable.Node>
org.apache.sis.util.collection.TreeNodeList
org.apache.sis.util.collection.DefaultTreeTable.Node.Children
- All Implemented Interfaces:
Serializable, Iterable<TreeTable.Node>, Collection<TreeTable.Node>, List<TreeTable.Node>, CheckedContainer<TreeTable.Node>
- Enclosing class:
DefaultTreeTable.Node
Implementation of
DefaultTreeTable.Node children list. This list updates automatically the
DefaultTreeTable.Node.parent field when the enclosing node is added to or removed from the
list of children of another Node instance.- Since:
- 0.3
- Version:
- 0.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.Fields inherited from class TreeNodeList
DRY_RUN, NULL, parent, THISFields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsetParentOf(TreeTable.Node node, int mode) Sets the parent of the given node if it is an instance ofDefaultTreeTable.Node, or throws an exception otherwise.Methods inherited from class TreeNodeList
add, addChild, contains, get, getElementType, indexOf, lastIndexOf, remove, remove, removeRange, set, size, toArrayMethods inherited from class AbstractList
add, addAll, clear, equals, hashCode, iterator, listIterator, listIterator, subListMethods inherited from class AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, streamMethods inherited from interface List
addAll, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
Children
Children(TreeTable.Node parent) Creates a new, initially empty, node list. The node given in argument to this constructor will be the parent of all nodes added as children to this list.- Parameters:
parent- the node which will own this list.
-
-
Method Details
-
setParentOf
Sets the parent of the given node if it is an instance ofDefaultTreeTable.Node, or throws an exception otherwise. This method is invoked when a node is added to or removed from the list.- Specified by:
setParentOfin classTreeNodeList- Parameters:
node- the node on which to set the parent (nevernull).mode- one of theTreeNodeList.NULL,TreeNodeList.THISorTreeNodeList.DRY_RUNconstants.- Throws:
IllegalArgumentException- if this method cannot set the parent of the given node.
-