@Test public void name_pattern_abc_dot_star__is_matching_abc_and_abcd_but_not_ab_or_null() { NamePatternToIdEntry entry = new NamePatternToIdEntry("abc.*","id1"); assertTrue(entry.isMatching("abc")); assertTrue(entry.isMatching("abcd")); assertFalse(entry.isMatching("ab")); assertFalse(entry.isMatching(null)); }
public boolean isMatching(String string) { if (string == null || regexp==null) { return false; } return regexp.matcher(string).matches(); }
NamePatternToIdEntry implements JSONable<NamePatternToIdEntry> { public boolean isMatching(String string) { if (string == null || regexp==null) { return false; } return regexp.matcher(string).matches(); } }
NamePatternToIdEntry implements JSONable<NamePatternToIdEntry> { public boolean isMatching(String string) { if (string == null || regexp==null) { return false; } return regexp.matcher(string).matches(); } private  NamePatternToIdEntry(); @JsonCreator  NamePatternToIdEntry(@JsonProperty("namePattern")String namePattern,@JsonProperty("id") String id); }
NamePatternToIdEntry implements JSONable<NamePatternToIdEntry> { public boolean isMatching(String string) { if (string == null || regexp==null) { return false; } return regexp.matcher(string).matches(); } private  NamePatternToIdEntry(); @JsonCreator  NamePatternToIdEntry(@JsonProperty("namePattern")String namePattern,@JsonProperty("id") String id); static NamePatternToIdEntry createFromJSON(String json); String getNamePattern(); String getId(); boolean isMatching(String string); @Override Class<NamePatternToIdEntry> getJSONTargetClass(); @Override String toString(); }
NamePatternToIdEntry implements JSONable<NamePatternToIdEntry> { public boolean isMatching(String string) { if (string == null || regexp==null) { return false; } return regexp.matcher(string).matches(); } private  NamePatternToIdEntry(); @JsonCreator  NamePatternToIdEntry(@JsonProperty("namePattern")String namePattern,@JsonProperty("id") String id); static NamePatternToIdEntry createFromJSON(String json); String getNamePattern(); String getId(); boolean isMatching(String string); @Override Class<NamePatternToIdEntry> getJSONTargetClass(); @Override String toString();  }