public final class BoundNullaryPredicate extends Object implements NullaryPredicate
Predicate
to the
NullaryPredicate
interface
using a constant unary argument.Constructor and Description |
---|
BoundNullaryPredicate(Predicate<? super A> predicate,
A arg)
Create a new BoundNullaryPredicate instance.
|
Modifier and Type | Method and Description |
---|---|
static <A> BoundNullaryPredicate |
bind(Predicate<? super A> predicate,
A arg)
Adapt the given, possibly-
null ,
Predicate to the
NullaryPredicate interface by binding
the specified Object as a constant
argument. |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
test()
Evaluate this predicate.
|
String |
toString() |
public BoundNullaryPredicate(Predicate<? super A> predicate, A arg)
A
- input typepredicate
- the predicate to adaptarg
- the constant argument to usepublic boolean test()
test
in interface NullaryPredicate
public static <A> BoundNullaryPredicate bind(Predicate<? super A> predicate, A arg)
null
,
Predicate
to the
NullaryPredicate
interface by binding
the specified Object
as a constant
argument.
When the given Predicate
is null
,
returns null
.Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.