Package org.apache.activemq.filter
Class DestinationMapNode
- java.lang.Object
-
- org.apache.activemq.filter.DestinationMapNode
-
- All Implemented Interfaces:
DestinationNode
public class DestinationMapNode extends Object implements DestinationNode
An implementation class used to implementDestinationMap
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringANY_CHILDprotected static StringANY_DESCENDENT
-
Constructor Summary
Constructors Constructor Description DestinationMapNode(DestinationMapNode parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String[] paths, int idx, Object value)voidappendDescendantValues(Set answer)voidappendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep)voidappendMatchingValues(Set answer, String[] paths, int idx)voidappendMatchingWildcards(Set answer, String[] paths, int idx)Matches any entries in the map containing wildcardsprotected DestinationMapNodecreateChildNode()Factory method to create a child nodeDestinationNodegetChild(String path)Returns the child node for the given named path or null if it does not existintgetChildCount()DestinationMapNodegetChildOrCreate(String path)Returns the child node for the given named path, lazily creating one if it does not yet existCollection<DestinationNode>getChildren()Returns the child nodesSetgetDesendentValues()Returns a list of all the values from this node down the treeStringgetPath()ListgetValues()Returns a mutable List of the values available at this node in the treebooleanisEmpty()protected voidpruneIfEmpty()voidremove(String[] paths, int idx, Object value)voidremoveAll(Set<DestinationNode> answer, String[] paths, int startIndex)protected voidremoveChild(DestinationMapNode node)SetremoveDesendentValues()protected voidremoveDesendentValues(Set answer)ListremoveValues()Removes values available at this node in the treevoidset(String[] paths, int idx, Object value)
-
-
-
Field Detail
-
ANY_CHILD
protected static final String ANY_CHILD
- See Also:
- Constant Field Values
-
ANY_DESCENDENT
protected static final String ANY_DESCENDENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DestinationMapNode
public DestinationMapNode(DestinationMapNode parent)
-
-
Method Detail
-
getChild
public DestinationNode getChild(String path)
Returns the child node for the given named path or null if it does not exist- Specified by:
getChildin interfaceDestinationNode
-
getChildren
public Collection<DestinationNode> getChildren()
Returns the child nodes- Specified by:
getChildrenin interfaceDestinationNode
-
getChildCount
public int getChildCount()
-
getChildOrCreate
public DestinationMapNode getChildOrCreate(String path)
Returns the child node for the given named path, lazily creating one if it does not yet exist
-
getValues
public List getValues()
Returns a mutable List of the values available at this node in the tree- Specified by:
getValuesin interfaceDestinationNode
-
removeValues
public List removeValues()
Removes values available at this node in the tree- Specified by:
removeValuesin interfaceDestinationNode
-
removeDesendentValues
public Set removeDesendentValues()
- Specified by:
removeDesendentValuesin interfaceDestinationNode
-
removeDesendentValues
protected void removeDesendentValues(Set answer)
-
getDesendentValues
public Set getDesendentValues()
Returns a list of all the values from this node down the tree- Specified by:
getDesendentValuesin interfaceDestinationNode
-
removeAll
public void removeAll(Set<DestinationNode> answer, String[] paths, int startIndex)
-
appendDescendantValues
public void appendDescendantValues(Set answer)
- Specified by:
appendDescendantValuesin interfaceDestinationNode
-
createChildNode
protected DestinationMapNode createChildNode()
Factory method to create a child node
-
appendMatchingWildcards
public void appendMatchingWildcards(Set answer, String[] paths, int idx)
Matches any entries in the map containing wildcards- Specified by:
appendMatchingWildcardsin interfaceDestinationNode
-
appendMatchingValues
public void appendMatchingValues(Set answer, String[] paths, int idx)
- Specified by:
appendMatchingValuesin interfaceDestinationNode
-
appendMatchingValues
public void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep)
-
getPath
public String getPath()
-
isEmpty
public boolean isEmpty()
-
pruneIfEmpty
protected void pruneIfEmpty()
-
removeChild
protected void removeChild(DestinationMapNode node)
-
-