private Map<String, Object> containedPredicateToMap() {

    Map<String, Object> map = null;

    if (delegate != null) {
      org.apache.commons.collections4.Predicate[] predicates = delegate.getPredicates();

      if ((predicates != null) && (predicates.length > 0)) {
        // Only process the 1st predicate.
        org.apache.commons.collections4.Predicate p = predicates[0];
        if (p instanceof Predicate) {
          map = ((Predicate) p).toMap();
        } else {
          throw new UnsupportedOperationException(String.format("Cannot convert a %s to a Map", p.getClass().getName()));
        }
      }
    }

    return map;
  }
Processes the contained predicate into a Map.
<p>
This is used to serialize this {@link DelegatedSinglePredicateContainer} into a {@link Map}

@return a map representing the contained predicate
ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedSinglePredicateContainer.java