Package introspector.model
Class CollectionNode
java.lang.Object
introspector.model.AbstractNode
introspector.model.CollectionNode
- All Implemented Interfaces:
Node,Serializable
CollectionNode provides a Node implementation to represent any value whose type is a java.util.Collection.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionNode(String name, Object value) CollectionNode(String name, Object value, Class<?> type) -
Method Summary
Modifier and TypeMethodDescriptioncompareTrees(Node node2, boolean equalName, Set<Node> modifiedNodes, Set<SymmetricPair<Node, Node>> alreadyTraversed) Compare two trees and return the list of modified nodes.Collection node has as many children as elements in the collection.booleanisLeaf()A collection node is not leaf.Methods inherited from class introspector.model.AbstractNode
equals, getChild, getChildrenCount, getClassName, getIndexOfChild, getName, getNodeDescription, getType, getValue, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface introspector.model.Node
getChild, getChildrenCount, getClassName, getIndexOfChild, getName, getNodeDescription, getType, getValue
-
Constructor Details
-
CollectionNode
- See Also:
-
CollectionNode
- See Also:
-
-
Method Details
-
isLeaf
public boolean isLeaf()A collection node is not leaf. -
getChildren
Collection node has as many children as elements in the collection. A node is created for each child.- Specified by:
getChildrenin classAbstractNode- Returns:
- The children of this node (null if there are no children)
- See Also:
-
compareTrees
public Set<Node> compareTrees(Node node2, boolean equalName, Set<Node> modifiedNodes, Set<SymmetricPair<Node, Node>> alreadyTraversed) Description copied from interface:NodeCompare two trees and return the list of modified nodes.- Specified by:
compareTreesin interfaceNode- Overrides:
compareTreesin classAbstractNode- Parameters:
node2- The node to compare with the other treeequalName- Whether the node names must be the same or not (important for root nodes)modifiedNodes- The list of modified nodesalreadyTraversed- The list of nodes that have been visited in this traversal- Returns:
- The list of modified nodes
- See Also:
-