Refactor enums to classes with static fields

This commit is contained in:
SpaiR committed 2019-12-29 23:59:39 +03:00
1 parent d4c59568d7
commit 8d241a60e6
35 files changed
+551 -769

No files matched your search

@@ -1,27 +1,40 @@
package imgui;
public final class ImDouble {
public static ImDouble TMP = new ImDouble();
import java.util.Objects;
public final class ImDouble {
double[] data = new double[]{0.0d};
public ImDouble() {
}
public ImDouble(double value) {
setValue(value);
set(value);
}
public double getValue() {
public double get() {
return this.data[0];
}
public void setValue(double value) {
public void set(double value) {
this.data[0] = value;
}
@Override
public String toString() {
return String.valueOf(getValue());
return String.valueOf(get());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ImDouble imDouble = (ImDouble) o;
return data[0] == imDouble.data[0];
}
@Override
public int hashCode() {
return Objects.hash(data[0]);
}
}