| Constructor and Description |
|---|
Location(int x,
int y)
Creates a Location instance.
|
Location(Location other)
Creates a location from another location instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getX() |
int |
getY() |
int |
hashCode() |
void |
offset(int dx,
int dy)
Translates this location by the specified amount (in place!).
|
void |
offset(Location amount)
Translates this location by the specified amount (in place!).
|
String |
toString() |
public static final Location ZERO
public Location(int x,
int y)
x - The X coordinate of this location.y - The Y coordinate of this location.public Location(Location other)
other - A location instance from which to create the location.public void offset(int dx,
int dy)
dx - The amount to offset the x-coordinate.dy - The amount to offset the y-coordinate.public void offset(Location amount)
amount - The amount the offset.public int getX()
public int getY()
Copyright © 2016. All rights reserved.