aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
index 0a5a94565..4fae98f08 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
@@ -57,7 +57,9 @@ public class Dimension implements Cloneable, DimensionImmutable {
}
}
+ @Override
public int getWidth() { return width; }
+ @Override
public int getHeight() { return height; }
public void setWidth(int width) {
@@ -77,10 +79,12 @@ public class Dimension implements Cloneable, DimensionImmutable {
return this;
}
+ @Override
public String toString() {
return new String(width+" x "+height);
}
+ @Override
public boolean equals(Object obj) {
if(this == obj) { return true; }
if (obj instanceof Dimension) {
@@ -91,6 +95,7 @@ public class Dimension implements Cloneable, DimensionImmutable {
return false;
}
+ @Override
public int hashCode() {
// 31 * x == (x << 5) - x
int hash = 31 + width;