activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r1516803 - in /activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter: DestinationMap.java DestinationMapNode.java
Date Fri, 23 Aug 2013 10:12:26 GMT
Author: rajdavies
Date: Fri Aug 23 10:12:25 2013
New Revision: 1516803

URL: http://svn.apache.org/r1516803
Log:
Added isEmpty() on DestinationMap

Modified:
    activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java
    activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMapNode.java

Modified: activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java?rev=1516803&r1=1516802&r2=1516803&view=diff
==============================================================================
--- activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java
(original)
+++ activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java
Fri Aug 23 10:12:25 2013
@@ -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) {

Modified: activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMapNode.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMapNode.java?rev=1516803&r1=1516802&r2=1516803&view=diff
==============================================================================
--- activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMapNode.java
(original)
+++ activemq/trunk/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMapNode.java
Fri Aug 23 10:12:25 2013
@@ -239,6 +239,10 @@ public class DestinationMapNode implemen
         return path;
     }
 
+    public boolean isEmpty(){
+        return childNodes.isEmpty();
+    }
+
     protected void pruneIfEmpty() {
         if (parent != null && childNodes.isEmpty() && values.isEmpty()) {
             parent.removeChild(this);



Mime
View raw message