Package com.jogamp.nativewindow.util
Class Dimension
- java.lang.Object
-
- com.jogamp.nativewindow.util.Dimension
-
- All Implemented Interfaces:
WriteCloneable
,DimensionImmutable
,Cloneable
,Comparable<DimensionImmutable>
public class Dimension extends Object implements Cloneable, DimensionImmutable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
cloneMutable
public Object cloneMutable()
- Specified by:
cloneMutable
in interfaceWriteCloneable
-
clone
public Object clone()
-
getWidth
public final int getWidth()
- Specified by:
getWidth
in interfaceDimensionImmutable
-
getHeight
public final int getHeight()
- Specified by:
getHeight
in interfaceDimensionImmutable
-
set
public final void set(int width, int height)
-
setWidth
public final void setWidth(int width)
-
setHeight
public final void setHeight(int height)
-
scale
public final Dimension scale(int s)
-
compareTo
public int compareTo(DimensionImmutable d)
Description copied from interface:DimensionImmutable
Compares square of size.
- Specified by:
compareTo
in interfaceComparable<DimensionImmutable>
- Specified by:
compareTo
in interfaceDimensionImmutable
-
equals
public boolean equals(Object obj)
Description copied from interface:DimensionImmutable
Checks whether two dimensions objects are equal. Two instances ofDimensionReadOnly
are equal if two componentsheight
andwidth
are equal.- Specified by:
equals
in interfaceDimensionImmutable
- Overrides:
equals
in classObject
- Returns:
true
if the two dimensions are equal; otherwisefalse
.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceDimensionImmutable
- Overrides:
hashCode
in classObject
-
-