@Override
  public boolean evaluate(Resource resource) {
    Object propertyValue =  resource.getPropertyValue(getPropertyId());
    matcher.reset(propertyValue != null ? propertyValue.toString() : emptyString);

    return patternExpr == null ?
      propertyValue == null :
      propertyValue != null && matcher.matches();
  }
Takes the PropertyId and a regex to match with the property value
@param propertyId Property Id
@param patternExpr Regex pattern
ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java