Search in sources :

Example 1 with IntTest

use of suite.primitive.IntPrimitives.IntTest in project suite by stupidsing.

the class IntFunUtil method isAny.

public static boolean isAny(IntTest pred0, IntSource source) {
    IntTest pred1 = pred0.rethrow();
    int c;
    while ((c = source.source()) != EMPTYVALUE) if (pred1.test(c))
        return true;
    return false;
}
Also used : IntTest(suite.primitive.IntPrimitives.IntTest)

Example 2 with IntTest

use of suite.primitive.IntPrimitives.IntTest in project suite by stupidsing.

the class IntFunUtil method isAll.

public static boolean isAll(IntTest pred0, IntSource source) {
    IntTest pred1 = pred0.rethrow();
    int c;
    while ((c = source.source()) != EMPTYVALUE) if (!pred1.test(c))
        return false;
    return true;
}
Also used : IntTest(suite.primitive.IntPrimitives.IntTest)

Aggregations

IntTest (suite.primitive.IntPrimitives.IntTest)2