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 ImShort {
|
||||
public final class ImShort implements Cloneable {
|
||||
final short[] data = new short[]{0};
|
||||
|
||||
public ImShort() {
|
||||
}
|
||||
|
||||
public ImShort(final ImShort imShort) {
|
||||
this.data[0] = imShort.data[0];
|
||||
}
|
||||
|
||||
public ImShort(final short value) {
|
||||
set(value);
|
||||
}
|
||||
@@ -41,4 +45,9 @@ public final class ImShort {
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImShort clone() {
|
||||
return new ImShort(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user