30package com.jogamp.nativewindow.util;
41 this(size[0], size[1]);
44 public Dimension(
final int width,
final int height) {
45 if(width<0 || height<0) {
46 throw new IllegalArgumentException(
"width and height must be within: ["+0+
".."+Integer.MAX_VALUE+
"]");
61 }
catch (
final CloneNotSupportedException ex) {
62 throw new InternalError();
71 public final void set(
final int width,
final int height) {
94 return width +
" x " + height;
99 final int tsq = width*height;
104 }
else if(tsq < xsq) {
111 public boolean equals(
final Object obj) {
112 if(
this == obj) {
return true; }
115 return height == p.height &&
124 final int hash = 31 + width;
125 return ((hash << 5) - hash) + height;
final void setWidth(final int width)
Dimension(final int[] size)
boolean equals(final Object obj)
Checks whether two dimensions objects are equal.
int compareTo(final DimensionImmutable d)
final Dimension add(final Dimension pd)
final Dimension scale(final int s)
Dimension(final int width, final int height)
final void setHeight(final int height)
Immutable Dimension Interface, consisting of it's read only components: