@Test public void testConstraintValidation() { AttrInteger attr = AttrInteger.builder().min(10).max(20).defaultValue(null); attr.set(10); attr.set(20); Assertions.assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> attr.set(9)); Assertions.assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> attr.set(21)); }
public static Builder builder() { return new Builder(); }
AttrInteger extends Attr<Integer> { public static Builder builder() { return new Builder(); } }
AttrInteger extends Attr<Integer> { public static Builder builder() { return new Builder(); } private  AttrInteger(
      Integer value, List<? extends Constraint<? super Integer>> constraint, String label); }
AttrInteger extends Attr<Integer> { public static Builder builder() { return new Builder(); } private  AttrInteger(
      Integer value, List<? extends Constraint<? super Integer>> constraint, String label); static Builder builder(); }
AttrInteger extends Attr<Integer> { public static Builder builder() { return new Builder(); } private  AttrInteger(
      Integer value, List<? extends Constraint<? super Integer>> constraint, String label); static Builder builder();  }