| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public Object | cloneMutable()
Implements com. |
| public int | compareTo(final PointImmutable
the object to be compared. d)Implements com. Compares the square of the position. |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. Implements com. |
| public final int | |
| public final int | |
| public int | hashCode()
Overrides java. Implements com. |
| public final Point | Returns: this instance for scalingscale factor for x sx, final int scale factor for y sy)Scale this instance's x- and y-components, i.e. multiply them by the given scale factors. |
| public final Point | Returns: this instance for scalingscale factor for x sx, final float scale factor for y sy)Scale this instance's x- and y-components, i.e. multiply them by the given scale factors. |
| public final Point | Returns: this instance for scalinginverse scale factor for x sx, final int inverse scale factor for y sy)Inverse scale this instance's x- and y-components, i.e. divide them by the given scale factors. |
| public final Point | Returns: this instance for scalinginverse scale factor for x sx, final float inverse scale factor for y sy)Inverse scale this instance's x- and y-components, i.e. divide them by the given scale factors. |
| public final void | |
| public final void | |
| public final void | |
| public String | |
| public final Point | |
| public final Point | Returns: this instance for scalingdelta for x dx, final int delta for y dy)Translate this instance's x- and y-components, i.e. add the given deltas to them. |
| Point | back to summary |
|---|---|
| public Point(final int x, final int y) | |
| Point | back to summary |
|---|---|
| public Point() | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| cloneMutable | back to summary |
|---|---|
| public Object cloneMutable() Implements com. Doc from com. Get a mutable clone from this instance.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(final PointImmutable d) Implements com. Doc from com. Compares the square of the position. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Implements com. Doc from com. Checks whether two points objects are equal. Two instances
of
| |
| getX | back to summary |
|---|---|
| public final int getX() Implements com.
| |
| getY | back to summary |
|---|---|
| public final int getY() Implements com.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements com. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| scale | back to summary |
|---|---|
| public final Point scale(final int sx, final int sy) Scale this instance's x- and y-components, i.e. multiply them by the given scale factors.
| |
| scale | back to summary |
|---|---|
| public final Point scale(final float sx, final float sy) Scale this instance's x- and y-components, i.e. multiply them by the given scale factors. The product is rounded back to integer.
| |
| scaleInv | back to summary |
|---|---|
| public final Point scaleInv(final int sx, final int sy) Inverse scale this instance's x- and y-components, i.e. divide them by the given scale factors.
| |
| scaleInv | back to summary |
|---|---|
| public final Point scaleInv(final float sx, final float sy) Inverse scale this instance's x- and y-components, i.e. divide them by the given scale factors. The product is rounded back to integer.
| |
| set | back to summary |
|---|---|
| public final void set(final int x, final int y) | |
| setX | back to summary |
|---|---|
| public final void setX(final int x) | |
| setY | back to summary |
|---|---|
| public final void setY(final int y) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| translate | back to summary |
|---|---|
| public final Point translate(final Point pd) Translate this instance's x- and y-components, i.e. add the values of the given delta point to them. | |
| translate | back to summary |
|---|---|
| public final Point translate(final int dx, final int dy) Translate this instance's x- and y-components, i.e. add the given deltas to them.
| |