public final class IntPairFix extends Object implements ConstIntPair, Serializable, Cloneable
x
, y
) of int
values.IntPairFix
s are immutable, i.e. all fields are final.IntPair
s can substitute or be a base for substitution
of Point
, Dimension
, Rectangle
and others
to eliminate their design flaws.de.frame4j.math
,
Complex
,
CFun
,
Serialized FormModifier and Type | Field and Description |
---|---|
static IntPairFix |
ONES
The pair (1, 1).
|
int |
x
The first value (x, width, real and else).
|
int |
y
The second value (y, height, imaginary and else).
|
static IntPairFix |
ZEROS
The pair (0, 0).
|
Modifier and Type | Method and Description |
---|---|
IntPairFix |
asIntPairFix()
Meke a IntPairFis in current state.
|
Object |
clone()
Make a copy.
|
boolean |
equals(Object o)
Compare with other Object.
|
int |
getX()
The first value (x, width, real and else).
|
int |
getY()
The second value (y, height, imaginary and else).
|
int |
hashCode()
Get the hashCode.
|
static IntPairFix |
of(Dimension dim)
Make or get of Dimension.
|
static IntPairFix |
of(Point point)
Make or get of Point.
|
static IntPairFix |
ofInts(int x,
int y)
Make of two integer values.
|
String |
toString()
As String (x, y).
|
public static final IntPairFix ZEROS
public static final IntPairFix ONES
public final int x
public final int y
public final int getX()
getX
in interface ConstIntPair
public final int getY()
getY
in interface ConstIntPair
public static final IntPairFix ofInts(int x, int y)
public static final IntPairFix of(Dimension dim)
dim
- for width, height; null gets ZEROS
public static final IntPairFix of(Point point)
point
- for x, y; null gets ZEROS
public boolean equals(Object o)
equals
in class Object
ConstIntPair.equals(ConstIntPair)
public String toString()
toString
in class Object
ConstIntPair.asString()
public Object clone()
public IntPairFix asIntPairFix()
asIntPairFix
in interface ConstIntPair