public abstract class AbstractTreeNode extends Object implements TreeNode, Comparable<TreeNode>
| Modifier and Type | Field and Description |
|---|---|
protected String |
category |
protected Map<String,TreeNode> |
children |
protected String |
description |
protected boolean |
enabled |
protected String |
name |
| Constructor and Description |
|---|
AbstractTreeNode() |
| Modifier and Type | Method and Description |
|---|---|
TreeNode |
addChild(TreeNode newChild) |
int |
compareTo(TreeNode other) |
boolean |
equals(Object o) |
String |
getCategory() |
TreeNode |
getChild(String childName) |
Collection<TreeNode> |
getChildNodes()
Returns a mutable view of the children
|
Enumeration<TreeNode> |
getChildNodesImmutable() |
String |
getCompletePathName() |
String |
getDescription() |
Collection<TreeNode> |
getEnabledChildNodes()
Returns a mutable view of the children
|
String |
getName() |
TreeNode |
getNode(String completeName) |
List<TreeNode> |
getNodes(String pattern)
Behaves as {@link #getNodes (String, boolean, boolean) with ignoreDisabled set to true
and gfV2Compatible set to true
Pattern is considered to be a GFV2 Compatible Pattern
|
List<TreeNode> |
getNodes(String pattern,
boolean ignoreDisabled,
boolean gfv2Compatible)
Returns all nodes that match the given Regex pattern as specified by the
Pattern class.
|
TreeNode |
getParent() |
TreeNode |
getPossibleParentNode(String pattern)
Get the "parent" matching the given pattern.
|
Object |
getValue() |
boolean |
hasChildNodes() |
int |
hashCode() |
boolean |
isEnabled() |
void |
removeChild(TreeNode oldChild) |
void |
setCategory(String category) |
void |
setDescription(String description) |
void |
setEnabled(boolean enabled) |
void |
setName(String aname) |
void |
setParent(TreeNode parent) |
String |
toString() |
List<TreeNode> |
traverse(boolean ignoreDisabled)
Returns all the nodes under the current tree
|
protected String name
protected String category
protected String description
protected boolean enabled
public String getName()
getName in interface TreeElementpublic void setName(String aname)
setName in interface TreeElementpublic Object getValue()
getValue in interface TreeElementpublic void setEnabled(boolean enabled)
setEnabled in interface TreeNodepublic String getCompletePathName()
getCompletePathName in interface TreeNodepublic Collection<TreeNode> getChildNodes()
getChildNodes in interface TreeNodepublic Collection<TreeNode> getEnabledChildNodes()
getEnabledChildNodes in interface TreeNodepublic Enumeration<TreeNode> getChildNodesImmutable()
public boolean hasChildNodes()
hasChildNodes in interface TreeNodepublic void removeChild(TreeNode oldChild)
removeChild in interface TreeNodepublic String getCategory()
getCategory in interface TreeNodepublic void setCategory(String category)
setCategory in interface TreeNodepublic String getDescription()
getDescription in interface TreeNodepublic void setDescription(String description)
setDescription in interface TreeNodepublic List<TreeNode> traverse(boolean ignoreDisabled)
public List<TreeNode> getNodes(String pattern, boolean ignoreDisabled, boolean gfv2Compatible)
TreeNodegetNodes in interface TreeNodepattern - Find a node that matches the pattern. By default pattern should follow the conventions
outlined by the java.util.regex.Pattern class.ignoreDisabled - will ignore a disabled node and its childrengfv2Compatible - in this mode, * has the same meaning as .* in the Pattern class.
The implementation should consider pattern as a v2 pattern.public List<TreeNode> getNodes(String pattern)
TreeNodepublic int compareTo(TreeNode other)
compareTo in interface Comparable<TreeNode>public TreeNode getPossibleParentNode(String pattern)
TreeNodegetPossibleParentNode in interface TreeNodepattern - Find a node that matches the pattern. By default pattern should follow the conventions
outlined by the java.util.regex.Pattern class.Copyright © 2017. All rights reserved.