public static Map<String, Object> toMap(Predicate predicate) {
    return (predicate == null) ? null : predicate.toMap();
  }
Safely serializes the specified {@link Predicate} to a {@link Map}

@param predicate the {@link Predicate} to process
@return a {@link Map} or null of the supplied predicate is null
ambari-server/src/main/java/org/apache/ambari/server/collections/PredicateUtils.java