@Test public void getParamsMatching() { Map<String, String> params = new HashMap<>(); params.put("x_first", "test"); params.put("x_second", "test_2"); params.put("another", "value"); params.put("something_else", "blah"); List<Utils.Pair<String, String>> matchedParams = ParameterizedTag.getParamsMatching(Pattern.compile("x_[^=]+"), params); assertEquals(2, matchedParams.size()); Collections.sort(matchedParams, new Comparator<Utils.Pair<String, String>>() { @Override public int compare(Utils.Pair<String, String> o1, Utils.Pair<String, String> o2) { return o1.first.compareTo(o2.first); } }); assertEquals("x_first", matchedParams.get(0).first); assertEquals("x_second", matchedParams.get(1).first); assertEquals("test", matchedParams.get(0).second); assertEquals("test_2", matchedParams.get(1).second); }
protected List<Utils.Pair<String, String>> getParamsMatching(Pattern pattern) { return getParamsMatching(pattern, mParams); }
ParameterizedTag extends Tag { protected List<Utils.Pair<String, String>> getParamsMatching(Pattern pattern) { return getParamsMatching(pattern, mParams); } }
ParameterizedTag extends Tag { protected List<Utils.Pair<String, String>> getParamsMatching(Pattern pattern) { return getParamsMatching(pattern, mParams); } ParameterizedTag(String tagStr, int taggedTextStart); }
ParameterizedTag extends Tag { protected List<Utils.Pair<String, String>> getParamsMatching(Pattern pattern) { return getParamsMatching(pattern, mParams); } ParameterizedTag(String tagStr, int taggedTextStart);  }
ParameterizedTag extends Tag { protected List<Utils.Pair<String, String>> getParamsMatching(Pattern pattern) { return getParamsMatching(pattern, mParams); } ParameterizedTag(String tagStr, int taggedTextStart);   }