Refactor enums to classes with static fields
This commit is contained in:
1 parent
d4c59568d7
commit
8d241a60e6
35 files changed
+551
-769
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package imgui;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class ImLong {
|
||||
long[] data = new long[]{0};
|
||||
|
||||
@@ -7,19 +9,32 @@ public class ImLong {
|
||||
}
|
||||
|
||||
public ImLong(long value) {
|
||||
setValue(value);
|
||||
set(value);
|
||||
}
|
||||
|
||||
public long getValue() {
|
||||
public long get() {
|
||||
return this.data[0];
|
||||
}
|
||||
|
||||
public void setValue(long value) {
|
||||
public void set(long 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;
|
||||
ImLong imLong = (ImLong) o;
|
||||
return data[0] == imLong.data[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(data[0]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user