IPredclass stringLenGreater5 implements IPred<String> { public boolean apply(String s) { return s.length() > 5 } } IFuncclass oneIfTrue implements IFunc<Boolean, Integer> { public int apply(boolean b) { if b { return 1; } else { return 0; } } } IComparatorclass compareNumbers implements IComparator<Double> { public int apply(double a, double b) { if (a > b) { return 1; } else if (a == b) { return 0; } else { return -1; } } } |
Cheatography
https://cheatography.com
Wasde Cheat Sheet (DRAFT) by xueyuge
Jwnwndbwjsbsbsbwhwhsgsgsbshs
This is a draft cheat sheet. It is a work in progress and is not finished yet.