public class DestinationMapNode extends Object implements DestinationNode
DestinationMap| Modifier and Type | Field and Description |
|---|---|
protected static String |
ANY_CHILD |
protected static String |
ANY_DESCENDENT |
| Constructor and Description |
|---|
DestinationMapNode(DestinationMapNode parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String[] paths,
int idx,
Object value) |
void |
appendDescendantValues(Set answer) |
void |
appendMatchingValues(Set<DestinationNode> answer,
String[] paths,
int startIndex,
boolean deep) |
void |
appendMatchingValues(Set answer,
String[] paths,
int idx) |
void |
appendMatchingWildcards(Set answer,
String[] paths,
int idx)
Matches any entries in the map containing wildcards
|
protected DestinationMapNode |
createChildNode()
Factory method to create a child node
|
DestinationNode |
getChild(String path)
Returns the child node for the given named path or null if it does not
exist
|
int |
getChildCount() |
DestinationMapNode |
getChildOrCreate(String path)
Returns the child node for the given named path, lazily creating one if
it does not yet exist
|
Collection<DestinationNode> |
getChildren()
Returns the child nodes
|
Set |
getDesendentValues()
Returns a list of all the values from this node down the tree
|
String |
getPath() |
List |
getValues()
Returns a mutable List of the values available at this node in the tree
|
boolean |
isEmpty() |
protected void |
pruneIfEmpty() |
void |
remove(String[] paths,
int idx,
Object value) |
void |
removeAll(Set<DestinationNode> answer,
String[] paths,
int startIndex) |
protected void |
removeChild(DestinationMapNode node) |
Set |
removeDesendentValues() |
protected void |
removeDesendentValues(Set answer) |
List |
removeValues()
Removes values available at this node in the tree
|
void |
set(String[] paths,
int idx,
Object value) |
protected static final String ANY_CHILD
protected static final String ANY_DESCENDENT
public DestinationMapNode(DestinationMapNode parent)
public DestinationNode getChild(String path)
getChild in interface DestinationNodepublic Collection<DestinationNode> getChildren()
getChildren in interface DestinationNodepublic int getChildCount()
public DestinationMapNode getChildOrCreate(String path)
public List getValues()
getValues in interface DestinationNodepublic List removeValues()
removeValues in interface DestinationNodepublic Set removeDesendentValues()
removeDesendentValues in interface DestinationNodeprotected void removeDesendentValues(Set answer)
public Set getDesendentValues()
getDesendentValues in interface DestinationNodepublic void removeAll(Set<DestinationNode> answer, String[] paths, int startIndex)
public void appendDescendantValues(Set answer)
appendDescendantValues in interface DestinationNodeprotected DestinationMapNode createChildNode()
public void appendMatchingWildcards(Set answer, String[] paths, int idx)
appendMatchingWildcards in interface DestinationNodepublic void appendMatchingValues(Set answer, String[] paths, int idx)
appendMatchingValues in interface DestinationNodepublic void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep)
public boolean isEmpty()
protected void pruneIfEmpty()
protected void removeChild(DestinationMapNode node)
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.