|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.functor.core.Limit
public final class Limit
A predicate that returns true
the first n times it is invoked.
Constructor Summary | |
---|---|
Limit(int count)
Create a new Limit. |
Method Summary | |
---|---|
boolean |
test()
Evaluate this predicate. |
boolean |
test(Object obj)
Evaluate this predicate. |
boolean |
test(Object a,
Object b)
Evaluate this predicate. |
String |
toString()
Returns a human readable description of this functor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.commons.functor.Functor |
---|
equals, hashCode |
Constructor Detail |
---|
public Limit(int count)
count
- limitMethod Detail |
---|
public boolean test()
test
in interface Predicate
public boolean test(Object obj)
test
in interface UnaryPredicate<Object>
obj
- the A object to test
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 arguments
public String toString()
Object
implementation of this method.
toString
in interface Functor
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |