diff options
Diffstat (limited to 'src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java')
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java index 5c9dc279d..4c9672c26 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java @@ -58,7 +58,7 @@ public class Dimension implements Cloneable, DimensionImmutable { public Object clone() { try { return super.clone(); - } catch (CloneNotSupportedException ex) { + } catch (final CloneNotSupportedException ex) { throw new InternalError(); } } @@ -68,22 +68,22 @@ public class Dimension implements Cloneable, DimensionImmutable { @Override public final int getHeight() { return height; } - public final void set(int width, int height) { + public final void set(final int width, final int height) { this.width = width; this.height = height; } - public final void setWidth(int width) { + public final void setWidth(final int width) { this.width = width; } - public final void setHeight(int height) { + public final void setHeight(final int height) { this.height = height; } - public final Dimension scale(int s) { + public final Dimension scale(final int s) { width *= s; height *= s; return this; } - public final Dimension add(Dimension pd) { + public final Dimension add(final Dimension pd) { width += pd.width ; height += pd.height ; return this; @@ -108,10 +108,10 @@ public class Dimension implements Cloneable, DimensionImmutable { } @Override - public boolean equals(Object obj) { + public boolean equals(final Object obj) { if(this == obj) { return true; } if (obj instanceof Dimension) { - Dimension p = (Dimension)obj; + final Dimension p = (Dimension)obj; return height == p.height && width == p.width ; } @@ -121,7 +121,7 @@ public class Dimension implements Cloneable, DimensionImmutable { @Override public int hashCode() { // 31 * x == (x << 5) - x - int hash = 31 + width; + final int hash = 31 + width; return ((hash << 5) - hash) + height; } } |