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