MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / Ter

Class Ter

src/main/java/gregapi/code/IMath.java:61–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected