@Test public void matches() { NodeRole role = new NodeRole("hello", "a.*"); assertThat(role.matches("a1"), equalTo(true)); assertThat(role.matches("b1"), equalTo(false)); }
public boolean matches(String nodeName) { return _compiledPattern.matcher(nodeName).matches(); }
NodeRole implements Comparable<NodeRole> { public boolean matches(String nodeName) { return _compiledPattern.matcher(nodeName).matches(); } }
NodeRole implements Comparable<NodeRole> { public boolean matches(String nodeName) { return _compiledPattern.matcher(nodeName).matches(); } NodeRole(String name, String regex); }
NodeRole implements Comparable<NodeRole> { public boolean matches(String nodeName) { return _compiledPattern.matcher(nodeName).matches(); } NodeRole(String name, String regex); @Override int compareTo(NodeRole o); @Override boolean equals(Object o); @JsonProperty(PROP_NAME) String getName(); @JsonProperty(PROP_REGEX) String getRegex(); @Override int hashCode(); boolean matches(String nodeName); @Override String toString(); }
NodeRole implements Comparable<NodeRole> { public boolean matches(String nodeName) { return _compiledPattern.matcher(nodeName).matches(); } NodeRole(String name, String regex); @Override int compareTo(NodeRole o); @Override boolean equals(Object o); @JsonProperty(PROP_NAME) String getName(); @JsonProperty(PROP_REGEX) String getRegex(); @Override int hashCode(); boolean matches(String nodeName); @Override String toString();  }