| Constructor and Description |
|---|
Location(int x,
int y)
Creates a Location instance.
|
Location(Location other) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getX()
Gets the X coordinate of this location.
|
int |
getY()
Gets the Y coordinate of this location.
|
int |
hashCode() |
void |
offset(int dx,
int dy)
Translates this location by the specified amount.
|
void |
offset(Location amount)
Translates this location by the specified amount.
|
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)
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 © 2014. All rights reserved.