public final class Limit extends Object implements NullaryPredicate, Predicate<Object>, BinaryPredicate<Object,Object>
true
the first n times it is invoked, and
false
thereafter.Constructor and Description |
---|
Limit(int count)
Create a new Limit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
static Limit |
of(int count)
Get a Limit instance for the specified value.
|
boolean |
test()
Evaluate this predicate.
|
boolean |
test(Object obj)
Evaluate this predicate.
|
boolean |
test(Object a,
Object b)
Evaluate this predicate.
|
String |
toString() |
public Limit(int count)
count
- limitpublic boolean test()
test
in interface NullaryPredicate
public boolean test(Object a, Object b)
test
in interface BinaryPredicate<Object,Object>
a
- the L element of the ordered pair of argumentsb
- the R element of the ordered pair of argumentsCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.