List of usage examples for java.util.function LongPredicate test
boolean test(long value);
From source file:at.gridtec.lambda4j.function.bi.conversion.BiDoubleToLongFunction.java
/** * Returns a composed {@link BiDoublePredicate} 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 BiDoublePredicate} 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 . jav a 2 s.c om */ @Nonnull default BiDoublePredicate andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (value1, value2) -> after.test(applyAsLong(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToLongFunction.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}./*w ww.jav a2 s . c o m*/ */ @Nonnull default ObjLongPredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToLongFunction.java
/** * Returns a composed {@link ObjBytePredicate} 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 ObjBytePredicate} 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 w w .j ava2 s . c o m*/ */ @Nonnull default ObjBytePredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToLongFunction.java
/** * Returns a composed {@link ObjCharPredicate} 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 ObjCharPredicate} 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 2s .c o m*/ */ @Nonnull default ObjCharPredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToLongFunction.java
/** * Returns a composed {@link ObjFloatPredicate} 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 ObjFloatPredicate} 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 va2 s . co m*/ */ @Nonnull default ObjFloatPredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToLongFunction.java
/** * Returns a composed {@link ObjShortPredicate} 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 ObjShortPredicate} 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 2s .c o m */ @Nonnull default ObjShortPredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToLongFunction.java
/** * Returns a composed {@link ObjBooleanPredicate} 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 ObjBooleanPredicate} 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 w w .j a v a2s .c om*/ */ @Nonnull default ObjBooleanPredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToLongFunction.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}./*from w w w .j ava2 s. com*/ */ @Nonnull default ObjIntPredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToLongFunction.java
/** * Returns a composed {@link ObjDoublePredicate} 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 ObjDoublePredicate} 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 a2s . co m*/ */ @Nonnull default ObjDoublePredicate<T> andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (t, value) -> after.test(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.operator.binary.LongBinaryOperator2.java
/** * Returns a composed {@link BiLongPredicate} 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 BiLongPredicate} 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}./*w ww.j a v a 2 s. co m*/ */ @Nonnull default BiLongPredicate andThenToBoolean(@Nonnull final LongPredicate after) { Objects.requireNonNull(after); return (value1, value2) -> after.test(applyAsLong(value1, value2)); }