/** * A {@code long} specialized version of {@link #checkPrecondition(Object, * Predicate, Function)} * * @param condition The predicate * @param value The value * @param describer The describer of the predicate * * @return value * * @throws PreconditionViolationException If the predicate is false */ public static long checkPreconditionL( final long value, final boolean condition, final LongFunction<String> describer) { return innerCheckL(value, condition, describer); }
/** * A {@code long} specialized version of {@link #checkPrecondition(Object, * Predicate, Function)} * * @param condition The predicate * @param value The value * @param describer The describer of the predicate * * @return value * * @throws PreconditionViolationException If the predicate is false */ public static long checkPreconditionL( final long value, final boolean condition, final LongFunction<String> describer) { return innerCheckL(value, condition, describer); }
/** * A {@code long} specialized version of {@link #checkPrecondition(Object, * Predicate, Function)} * * @param value The value * @param predicate The predicate * @param describer The describer of the predicate * * @return value * * @throws PreconditionViolationException If the predicate is false */ public static long checkPreconditionL( final long value, final LongPredicate predicate, final LongFunction<String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed( Long.valueOf(value), singleViolation(failedPredicate(e))); } return innerCheckL(value, ok, describer); }
/** * A {@code long} specialized version of {@link #checkPrecondition(Object, * Predicate, Function)} * * @param value The value * @param predicate The predicate * @param describer The describer of the predicate * * @return value * * @throws PreconditionViolationException If the predicate is false */ public static long checkPreconditionL( final long value, final LongPredicate predicate, final LongFunction<String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed( Long.valueOf(value), singleViolation(failedPredicate(e))); } return innerCheckL(value, ok, describer); }