Substring (String[] tagNames, @NotNull String argName) { for (String tagName : tagNames) { final Map<Substring, Substring> argValues = myArgTagValues.get(tagName); final Substring key = new Substring(argName); if (argValues != null && argValues.containsKey(key)) { return argValues.get(key); } } return null; }