public class NativePoint
extends java.lang.Object
implements java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
int |
x
Point X coordinate.
|
int |
y
Point Y coordinate.
|
| Constructor and Description |
|---|
NativePoint()
Default constructor
|
NativePoint(int x,
int y)
Constructor.
|
NativePoint(NativePoint point)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Determine if this instance is equal with the specified object.
|
int |
hashCode()
Return the unique hash code for this object.
|
NativePoint |
minus(NativePoint point)
Shift point to specified negative offset.
|
NativePoint |
offset(int x,
int y)
Shift point to specified offset.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
java.lang.String |
toString()
For debug purposes
|
NativePoint |
translate(int dx,
int dy)
Translate point object by specified offset without creating new instance.
|
NativePoint |
translate(NativeInsets insets)
Translate point object by specified offset without creating new instance.
|
NativePoint |
translate(NativePoint point)
Translate point object by specified offset without creating new instance.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
public NativePoint()
public NativePoint(int x,
int y)
x - Point X.y - Point Y.public NativePoint(NativePoint point)
point - Source point.public NativePoint offset(int x, int y)
x - X offset.y - Y offset.public NativePoint translate(int dx, int dy)
dx - Delta X.dy - Delta Y.this for fluent syntax chained calls.public NativePoint translate(NativePoint point)
point - Source point.this for fluent syntax chained calls.public NativePoint translate(NativeInsets insets)
insets - Source insets.this for fluent syntax chained calls.public NativePoint minus(NativePoint point)
point - Source point.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
The two objects are equal if the obj is a NativePoint and its
x and y coordinates match with this instance.
equals in class java.lang.Objectobj - The object to check.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - Input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.