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

Class Sum

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

Source from the content-addressed store, hash-verified

67 }
68
69 public static class Sum<O> implements IMath<O> {
70 private final IMath<O>[] mValues;
71 @SafeVarargs
72 public Sum(IMath<O>... aValues) {mValues = aValues;}
73
74 @Override
75 public long getLong(O aObject) {
76 long rValue = 0;
77 for (IMath<O> tValue : mValues) rValue += tValue.getLong(aObject);
78 return rValue;
79 }
80
81 @Override
82 public double getDouble(O aObject) {
83 double rValue = 0;
84 for (IMath<O> tValue : mValues) rValue += tValue.getDouble(aObject);
85 return rValue;
86 }
87 }
88
89 public static class Mul<O> implements IMath<O> {
90 private final IMath<O>[] mValues;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected