Used by function object to indicate that it doesn't apply to the parameter
specified. This exception extends
org.osgl.exception.FastRuntimeExceptionthus 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