public class NotAppliedException extends FastRuntimeException
FastRuntimeException
thus performs much better than normal RuntimeExceptions. Here is one
example of using NotAppliedException:
_.F2<Integer, Integer, Integer> divide1 = new _.F1<Integer, Integer, Integer>() {
@Override
public int apply(int n, int d) {
if (d == 0) return NotAppliedException();
return n/d;
}
}
In the above example thrown out NotAppliedException when divider is zero is
faster than do the calculation directly and let Java thrown out| Constructor and Description |
|---|
NotAppliedException() |
doFillInStackTrace, fillInStackTraceaddSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringCopyright © 2017. All Rights Reserved.