public class Dimension extends Object implements Cloneable, DimensionImmutable
Constructor and Description |
---|
Dimension() |
Dimension(int[] size) |
Dimension(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
Dimension |
add(Dimension pd) |
Object |
clone() |
Object |
cloneMutable() |
int |
compareTo(DimensionImmutable d)
Compares square of size.
|
boolean |
equals(Object obj)
Checks whether two dimensions objects are equal.
|
int |
getHeight() |
int |
getWidth() |
int |
hashCode() |
Dimension |
scale(int s) |
void |
set(int width,
int height) |
void |
setHeight(int height) |
void |
setWidth(int width) |
String |
toString() |
public Dimension()
public Dimension(int[] size)
public Dimension(int width, int height)
public Object cloneMutable()
cloneMutable
in interface WriteCloneable
public final int getWidth()
getWidth
in interface DimensionImmutable
public final int getHeight()
getHeight
in interface DimensionImmutable
public final void set(int width, int height)
public final void setWidth(int width)
public final void setHeight(int height)
public final Dimension scale(int s)
public int compareTo(DimensionImmutable d)
DimensionImmutable
Compares square of size.
compareTo
in interface Comparable<DimensionImmutable>
compareTo
in interface DimensionImmutable
public boolean equals(Object obj)
DimensionImmutable
DimensionReadOnly
are equal if two components
height
and width
are equal.equals
in interface DimensionImmutable
equals
in class Object
true
if the two dimensions are equal;
otherwise false
.public int hashCode()
hashCode
in interface DimensionImmutable
hashCode
in class Object
Copyright 2010 JogAmp Community.