private String getWildcardProperty(String deflt, String separator, boolean inherit, Instruction ins) { // Handle a wildcard key, make sure they're sorted // for consistency String result = stream(inherit).filter(ins::matches) .sorted() .map(k -> getLiteralProperty(k, null, this, inherit)) .filter(v -> (v != null) && !v.isEmpty()) .collect(Strings.joining(separator, "", "", deflt)); return result; }
private String getWildcardProperty(String deflt, String separator, boolean inherit, Instruction ins) { // Handle a wildcard key, make sure they're sorted // for consistency String result = stream(inherit).filter(ins::matches) .sorted() .map(k -> getLiteralProperty(k, null, this, inherit)) .filter(v -> (v != null) && !v.isEmpty()) .collect(Strings.joining(separator, "", "", deflt)); return result; }
@SuppressWarnings("resource") private String getProperty(String key, String deflt, String separator, boolean inherit) { Instruction ins = new Instruction(key); if (ins.isLiteral()) { return getLiteralProperty(ins.getLiteral(), deflt, this, inherit); } return getWildcardProperty(deflt, separator, inherit, ins); }
@SuppressWarnings("resource") private String getProperty(String key, String deflt, String separator, boolean inherit) { Instruction ins = new Instruction(key); if (ins.isLiteral()) { return getLiteralProperty(ins.getLiteral(), deflt, this, inherit); } return getWildcardProperty(deflt, separator, inherit, ins); }