/** * A {@code double} specialized version of {@link #checkPostcondition(Object, * boolean, Function)} * * @param value The value * @param condition The predicate * @param describer The describer of the predicate * * @return value * * @throws PostconditionViolationException If the predicate is false */ public static double checkPostconditionD( final double value, final boolean condition, final DoubleFunction<String> describer) { return innerCheckD(value, condition, describer); }
/** * A {@code double} specialized version of {@link #checkPostcondition(Object, * boolean, Function)} * * @param value The value * @param condition The predicate * @param describer The describer of the predicate * * @return value * * @throws PostconditionViolationException If the predicate is false */ public static double checkPostconditionD( final double value, final boolean condition, final DoubleFunction<String> describer) { return innerCheckD(value, condition, describer); }
/** * A {@code double} specialized version of {@link #checkPostcondition(Object, * Predicate, Function)} * * @param value The value * @param predicate The predicate * @param describer The describer of the predicate * * @return value * * @throws PostconditionViolationException If the predicate is false */ public static double checkPostconditionD( final double value, final DoublePredicate predicate, final DoubleFunction<String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed( Double.valueOf(value), singleViolation(failedPredicate(e))); } return innerCheckD(value, ok, describer); }
/** * A {@code double} specialized version of {@link #checkPostcondition(Object, * Predicate, Function)} * * @param value The value * @param predicate The predicate * @param describer The describer of the predicate * * @return value * * @throws PostconditionViolationException If the predicate is false */ public static double checkPostconditionD( final double value, final DoublePredicate predicate, final DoubleFunction<String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed( Double.valueOf(value), singleViolation(failedPredicate(e))); } return innerCheckD(value, ok, describer); }