コード例 #1
0
  private boolean supportsValueInIncludeExcludeMap(Map includeExcludeMap, Object value) {
    if (includeExcludeMap.isEmpty()) {
      return true;
    }

    Set includes = (Set) includeExcludeMap.get(INCLUDES);
    if (includes != null) {
      return includes.contains(value);
    }

    Set excludes = (Set) includeExcludeMap.get(EXCLUDES);
    return !(excludes != null && excludes.contains(value));
  }
コード例 #2
0
 @SuppressWarnings("unchecked")
 private void evaluateAndAddToIncludeExcludeSet(
     Map targetMap, String includeExcludeString, boolean include, Closure converter) {
   Set set = lazilyCreateIncludeOrExcludeSet(targetMap, include);
   set.add(converter.call(includeExcludeString));
 }