mirror of https://github.com/apache/activemq.git
Added isEmpty() on DestinationMap
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1516803 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a52c014648
commit
eb99e05d3a
|
@ -232,6 +232,10 @@ public class DestinationMap {
|
|||
tempTopicRootNode = new DestinationMapNode(null);
|
||||
}
|
||||
|
||||
public boolean isEmpty(){
|
||||
return queueRootNode.isEmpty() && topicRootNode.isEmpty() && tempQueueRootNode.isEmpty() && tempTopicRootNode.isEmpty();
|
||||
}
|
||||
|
||||
public static Set union(Set existing, Set candidates) {
|
||||
if ( candidates != null ) {
|
||||
if (existing != null) {
|
||||
|
|
|
@ -239,6 +239,10 @@ public class DestinationMapNode implements DestinationNode {
|
|||
return path;
|
||||
}
|
||||
|
||||
public boolean isEmpty(){
|
||||
return childNodes.isEmpty();
|
||||
}
|
||||
|
||||
protected void pruneIfEmpty() {
|
||||
if (parent != null && childNodes.isEmpty() && values.isEmpty()) {
|
||||
parent.removeChild(this);
|
||||
|
|
Loading…
Reference in New Issue