org.apache.activemq.filter
Class DestinationMapNode

java.lang.Object
  extended by org.apache.activemq.filter.DestinationMapNode
All Implemented Interfaces:
DestinationNode

public class DestinationMapNode
extends Object
implements DestinationNode

An implementation class used to implement DestinationMap


Field Summary
protected static String ANY_CHILD
           
protected static String ANY_DESCENDENT
           
 
Constructor Summary
DestinationMapNode(DestinationMapNode parent)
           
 
Method Summary
 void add(String[] paths, int idx, Object value)
           
 void appendDescendantValues(Set answer)
           
 void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex)
           
 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
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()
          Returns a mutable List of the values available at this node in the tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
getChild in interface DestinationNode

getChildren

public Collection<DestinationNode> getChildren()
Returns the child nodes

Specified by:
getChildren in interface DestinationNode

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:
getValues in interface DestinationNode

removeValues

public List removeValues()
Returns a mutable List of the values available at this node in the tree

Specified by:
removeValues in interface DestinationNode

removeDesendentValues

public Set removeDesendentValues()
Specified by:
removeDesendentValues in interface DestinationNode

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:
getDesendentValues in interface DestinationNode

add

public void add(String[] paths,
                int idx,
                Object value)

remove

public void remove(String[] paths,
                   int idx,
                   Object value)

removeAll

public void removeAll(Set<DestinationNode> answer,
                      String[] paths,
                      int startIndex)

appendDescendantValues

public void appendDescendantValues(Set answer)
Specified by:
appendDescendantValues in interface DestinationNode

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:
appendMatchingWildcards in interface DestinationNode

appendMatchingValues

public void appendMatchingValues(Set<DestinationNode> answer,
                                 String[] paths,
                                 int startIndex)
Specified by:
appendMatchingValues in interface DestinationNode

getPath

public String getPath()

pruneIfEmpty

protected void pruneIfEmpty()

removeChild

protected void removeChild(DestinationMapNode node)


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.