Package org.apache.sis.util.collection
Class DefaultTreeTable.Node.Children
java.lang.Object
java.util.AbstractCollection<E>
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.util.collection.TreeNodeList
DRY_RUN, NULL, parent, THISFields inherited from class java.util.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 org.apache.sis.util.collection.TreeNodeList
add, addChild, contains, get, getElementType, indexOf, lastIndexOf, remove, remove, removeRange, set, size, toArrayMethods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, iterator, listIterator, listIterator, subListMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.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.
-