public final class Offset2D extends java.lang.Object implements java.io.Serializable
(dx, dy) in two dimensional space. Instances of
this class are immutable.
| Modifier and Type | Field and Description |
|---|---|
static Offset2D |
ZERO_OFFSET
Zero offset.
|
| Constructor and Description |
|---|
Offset2D()
Default constructor (
(0, 0)). |
Offset2D(double dx,
double dy)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
double |
getDX()
Returns the x-offset.
|
double |
getDY()
Returns the y-offset.
|
int |
hashCode()
Returns a hash code for this instance.
|
public static final Offset2D ZERO_OFFSET
public Offset2D()
(0, 0)).public Offset2D(double dx, double dy)
dx - the x-offset.dy - the y-offset.public double getDX()
public double getDY()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public int hashCode()
hashCode in class java.lang.Object