Implement Cloneable for all primitive wrappers
This commit is contained in:
1 parent
1e52d6ef82
commit
71e7265858
9 files changed
+100
-9
No files matched your search
@@ -2,12 +2,16 @@ package imgui;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImBool {
|
||||
public final class ImBool implements Cloneable {
|
||||
final boolean[] data = new boolean[]{false};
|
||||
|
||||
public ImBool() {
|
||||
}
|
||||
|
||||
public ImBool(final ImBool imBool) {
|
||||
this.data[0] = imBool.data[0];
|
||||
}
|
||||
|
||||
public ImBool(final boolean value) {
|
||||
data[0] = value;
|
||||
}
|
||||
@@ -41,4 +45,9 @@ public final class ImBool {
|
||||
public int hashCode() {
|
||||
return Objects.hash(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImBool clone() {
|
||||
return new ImBool(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user