@Test public void testPatternConstraintNominals() { assertTrue(simple.validate(YES)); assertFalse(simple.validate(NO)); }
@Override public boolean validate(Object object) { if (object == null) { return true; } return pattern.matcher(object.toString()).matches(); }
PatternConstraint extends AbstractConstraint { @Override public boolean validate(Object object) { if (object == null) { return true; } return pattern.matcher(object.toString()).matches(); } }
PatternConstraint extends AbstractConstraint { @Override public boolean validate(Object object) { if (object == null) { return true; } return pattern.matcher(object.toString()).matches(); } PatternConstraint(String pattern); }
PatternConstraint extends AbstractConstraint { @Override public boolean validate(Object object) { if (object == null) { return true; } return pattern.matcher(object.toString()).matches(); } PatternConstraint(String pattern); @Override boolean validate(Object object); @Override Description getDescription(); String getPattern(); @Override String getErrorMessage(Object invalidValue, Locale locale); @Override int hashCode(); @Override boolean equals(Object obj); }
PatternConstraint extends AbstractConstraint { @Override public boolean validate(Object object) { if (object == null) { return true; } return pattern.matcher(object.toString()).matches(); } PatternConstraint(String pattern); @Override boolean validate(Object object); @Override Description getDescription(); String getPattern(); @Override String getErrorMessage(Object invalidValue, Locale locale); @Override int hashCode(); @Override boolean equals(Object obj);  }