Example usage for java.util.function DoublePredicate test

List of usage examples for java.util.function DoublePredicate test

Introduction

In this page you can find the example usage for java.util.function DoublePredicate test.

Prototype

boolean test(double value);

Source Link

Document

Evaluates this predicate on the given argument.

Usage

From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToDoubleFunction.java

/**
 * Returns a composed {@link ObjIntPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code ObjIntPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}./*  w ww .ja v a2  s  .c  o  m*/
 */
@Nonnull
default ObjIntPredicate<T> andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.test(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToDoubleFunction.java

/**
 * Returns a composed {@link ObjLongPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code ObjLongPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}.//  ww  w  . java2  s  .  c om
 */
@Nonnull
default ObjLongPredicate<T> andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.test(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.operator.binary.DoubleBinaryOperator2.java

/**
 * Returns a composed {@link BiDoublePredicate} that first applies this operator to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive operator to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this operator is applied
 * @return A composed {@code BiDoublePredicate} that first applies this operator to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}./*from   w  w  w.  j  av a  2 s  .c  o  m*/
 */
@Nonnull
default BiDoublePredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.test(applyAsDouble(value1, value2));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriBooleanToDoubleFunction.java

/**
 * Returns a composed {@link BooleanTernaryOperator} that first applies this function to its input, and then applies
 * the {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed
 * to the caller of the composed operation. This method is just convenience, to provide the ability to transform
 * this primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code BooleanTernaryOperator} that first applies this function to its input, and then applies
 * the {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}.//from ww w  .  ja  v  a2  s .  c o m
 */
@Nonnull
default BooleanTernaryOperator andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriByteToDoubleFunction.java

/**
 * Returns a composed {@link TriBytePredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code TriBytePredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}.//from   w w  w  .  j av  a  2s  .  c  o  m
 */
@Nonnull
default TriBytePredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriCharToDoubleFunction.java

/**
 * Returns a composed {@link TriCharPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code TriCharPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}./*  www .  j  a va 2  s  .  c o m*/
 */
@Nonnull
default TriCharPredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriFloatToDoubleFunction.java

/**
 * Returns a composed {@link TriFloatPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code TriFloatPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}.//from   w ww. j a  v  a 2  s .  co  m
 */
@Nonnull
default TriFloatPredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriIntToDoubleFunction.java

/**
 * Returns a composed {@link TriIntPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code TriIntPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}./*www  . j a  v a  2s . c  om*/
 */
@Nonnull
default TriIntPredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriLongToDoubleFunction.java

/**
 * Returns a composed {@link TriLongPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code TriLongPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}./*from  w  w  w  .  jav  a 2 s .  c  o m*/
 */
@Nonnull
default TriLongPredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriShortToDoubleFunction.java

/**
 * Returns a composed {@link TriShortPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result. If evaluation of either operation throws an exception, it is relayed to
 * the caller of the composed operation. This method is just convenience, to provide the ability to transform this
 * primitive function to an operation returning {@code boolean}.
 *
 * @param after The predicate to apply after this function is applied
 * @return A composed {@code TriShortPredicate} that first applies this function to its input, and then applies the
 * {@code after} predicate to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
 * boolean}./*from  w w w  .  j  a  v a  2 s.  c  om*/
 */
@Nonnull
default TriShortPredicate andThenToBoolean(@Nonnull final DoublePredicate after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.test(applyAsDouble(value1, value2, value3));
}