private Set<String> getPropertyNames(Map<String, Object> props) { Set<String> names; if (getDynamic() || cachedNames == null) { names = new HashSet<>(); addPropertyNames(names, props); // Add this PropertySet's nested PropertySets' property names. for (PropertySet set : setRefs) { names.addAll(set.getPropertyMap().keySet()); } if (negate) { //make a copy... HashSet<String> complement = new HashSet<>(props.keySet()); complement.removeAll(names); names = complement; } if (!getDynamic()) { cachedNames = names; } } else { names = cachedNames; } return names; }