Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

@FunctionalInterface

public interface BiPredicate<T, U>

A test of two arguments; the two-argument form of Predicate.

Type parameters

<T>
the first input type
<U>
the second input type

Methods

public abstract boolean test(T t, U u)Whether t and u pass.
public default BiPredicate<T, U> and(BiPredicate<? super T, ? super U> other)Passes when this and other both pass; other is not asked when this fails.
public default BiPredicate<T, U> negate()Passes when this fails.
public default BiPredicate<T, U> or(BiPredicate<? super T, ? super U> other)Passes when this or other passes; other is not asked when this passes.

Method details

test

public abstract boolean test(T t, U u)
Whether t and u pass.

Parameters

t T
the first input
u U
the second input

Returns

true when they pass

and

public default BiPredicate<T, U> and(BiPredicate<? super T, ? super U> other)
Passes when this and other both pass; other is not asked when this fails.

Parameters

other BiPredicate<? super T, ? super U>
the second test

Returns

the composed test

negate

public default BiPredicate<T, U> negate()
Passes when this fails.

Returns

the negated test

or

public default BiPredicate<T, U> or(BiPredicate<? super T, ? super U> other)
Passes when this or other passes; other is not asked when this passes.

Parameters

other BiPredicate<? super T, ? super U>
the second test

Returns

the composed test