mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-24 21:13:50 +00:00
Merge remote-tracking branch 'origin/master' into mark-rounding-inference
Conflicts: java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties
This commit is contained in:
commit
6f89b80167
215 files changed
+8139
-361
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.confidence.AbstractScalarValue;
|
||||
import com.sap.sailing.domain.confidence.ScalableValue;
|
||||
|
||||
public class ScalableInteger implements AbstractScalarValue<Integer> {
|
||||
|
||||
private final Integer value;
|
||||
|
||||
public ScalableInteger(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScalableValue<Integer, Integer> multiply(double factor) {
|
||||
return new ScalableInteger((int) (getValue() * factor));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScalableValue<Integer, Integer> add(ScalableValue<Integer, Integer> t) {
|
||||
return new ScalableInteger(getValue() + t.getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer divide(double divisor) {
|
||||
return (int) (getValue() / divisor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user