| 59 | } |
| 60 | |
| 61 | public static class Ter<O> implements IMath<O> { |
| 62 | private final ICondition<O> mCondition; |
| 63 | private final IMath<O> mValueTrue, mValueFalse; |
| 64 | public Ter(ICondition<O> aCondition, IMath<O> aValueTrue, IMath<O> aValueFalse) {mCondition = aCondition; mValueTrue = aValueTrue; mValueFalse = aValueFalse;} |
| 65 | @Override public long getLong(O aObject) {return mCondition.isTrue(aObject) ? mValueTrue.getLong(aObject) : mValueFalse.getLong(aObject);} |
| 66 | @Override public double getDouble(O aObject) {return mCondition.isTrue(aObject) ? mValueTrue.getDouble(aObject) : mValueFalse.getDouble(aObject);} |
| 67 | } |
| 68 | |
| 69 | public static class Sum<O> implements IMath<O> { |
| 70 | private final IMath<O>[] mValues; |
nothing calls this directly
no outgoing calls
no test coverage detected