com.netflix.config
Class DefaultContextualPredicate

java.lang.Object
  extended by com.netflix.config.DefaultContextualPredicate
All Implemented Interfaces:
com.google.common.base.Predicate<java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>>

public class DefaultContextualPredicate
extends java.lang.Object
implements com.google.common.base.Predicate<java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>>

The default predicate (used by DynamicContextualProperty) which takes a Function to get the value of key included in the JSON blob as the input string value of DynamicContextualProperty.


Field Summary
static DefaultContextualPredicate PROPERTY_BASED
           
 
Constructor Summary
DefaultContextualPredicate(com.google.common.base.Function<java.lang.String,java.lang.String> getValueFromKeyFunction)
           
 
Method Summary
 boolean apply(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> input)
          For each key in the passed in map, this function returns true if the value derived from the key using the function (passed in from the constructor) matches any of the value included for the same key in the map the above holds true for all keys in the map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Predicate
equals
 

Field Detail

PROPERTY_BASED

public static final DefaultContextualPredicate PROPERTY_BASED
Constructor Detail

DefaultContextualPredicate

public DefaultContextualPredicate(com.google.common.base.Function<java.lang.String,java.lang.String> getValueFromKeyFunction)
Method Detail

apply

public boolean apply(@Nullable
                     java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> input)
For each key in the passed in map, this function returns true if
  • the value derived from the key using the function (passed in from the constructor) matches any of the value included for the same key in the map
  • the above holds true for all keys in the map

    Specified by:
    apply in interface com.google.common.base.Predicate<java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>>