@Test public void testPatternConstraintDescription() { Constraint.Description description = simple.getDescription(); assertEquals("PatternConstraint", description.getName()); Map<String, Serializable> params = description.getParameters(); assertEquals(1, params.size()); assertTrue(params.containsKey("Pattern")); assertEquals(PATTERN, params.get("Pattern")); }
@Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); params.put(PNAME_PATTERN, pattern.pattern()); return new Description(PatternConstraint.NAME, params); }
PatternConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); params.put(PNAME_PATTERN, pattern.pattern()); return new Description(PatternConstraint.NAME, params); } }
PatternConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); params.put(PNAME_PATTERN, pattern.pattern()); return new Description(PatternConstraint.NAME, params); } PatternConstraint(String pattern); }
PatternConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); params.put(PNAME_PATTERN, pattern.pattern()); return new Description(PatternConstraint.NAME, params); } 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 Description getDescription() { Map<String, Serializable> params = new HashMap<>(); params.put(PNAME_PATTERN, pattern.pattern()); return new Description(PatternConstraint.NAME, params); } 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);  }