public class LocationImpl extends java.lang.Object implements IAdvancedLocation
| Constructor and Description |
|---|
LocationImpl(ILocation location) |
LocationImpl(int x,
int y) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
ILocation |
getLocationCopy() |
int |
getX()
Gets the x value.
|
int |
getY()
Gets the y value.
|
int |
hashCode() |
void |
scale(double amount)
Changes the current location.
|
ILocation |
setLocation(ILocation location)
Sets the location.
|
ILocation |
setLocation(int x,
int y)
Sets the location.
|
void |
setX(int x)
Sets the x coordinate of this location.
|
void |
setY(int y)
Sets the y coordinate of this location.
|
java.lang.String |
toString() |
ILocation |
translate(int dx,
int dy)
Translates the current location.
|
public LocationImpl(int x,
int y)
public LocationImpl(ILocation location)
public int getX()
ILocationpublic int getY()
ILocationpublic void setX(int x)
ILocationpublic void setY(int y)
ILocationpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic ILocation getLocationCopy()
getLocationCopy in interface IAdvancedLocationpublic ILocation setLocation(int x, int y)
IAdvancedLocationsetLocation in interface IAdvancedLocationx - the new x coordinate of the locationy - the new y coordinate of the locationpublic ILocation setLocation(ILocation location)
IAdvancedLocationsetLocation in interface IAdvancedLocationlocation - the location which contains the new x and y coordinatespublic void scale(double amount)
IAdvancedLocationscale in interface IAdvancedLocationamount - x and y coordinate of the location will be multiplied with
this amountpublic ILocation translate(int dx, int dy)
IAdvancedLocationtranslate in interface IAdvancedLocationdx - this value will be added to the x coordinatedy - this value will be added to the y coordinate