Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2427#discussion_r233197359
  
    --- Diff: 
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
 ---
    @@ -318,6 +313,46 @@ public synchronized boolean containsProperty(final 
SimpleString key) {
           }
        }
     
    +   public synchronized boolean 
anyPropertyNameMatch(Predicate<SimpleString> propertyNamePredicate) {
    +      Objects.requireNonNull(propertyNamePredicate, "propertyNamePredicate 
cannot be null");
    +      if (properties == null) {
    +         return false;
    +      }
    +      if (properties.isEmpty()) {
    +         return false;
    +      }
    +      for (SimpleString propertyName : properties.keySet()) {
    +         if (propertyNamePredicate.test(propertyName)) {
    +            return true;
    +         }
    +      }
    +      return false;
    +   }
    +
    +   public synchronized boolean 
removeIfPropertyNameMatch(Predicate<SimpleString> propertyNamePredicate) {
    --- End diff --
    
    this is just a remove method , the args give the context that it removes 
only if predicate would match


---

Reply via email to