| 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() |
Location |
offset(int dx,
int dy)
Get a location translated by the specified amount.
|
Location |
offset(Location amount)
Get a location translated by the specified amount.
|
Location |
scale(double scaleRatio)
Get a scaled location.
|
String |
toString() |
String |
toStringForFilename() |
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 Location offset(int dx, int dy)
dx - The amount to offset the x-coordinate.dy - The amount to offset the y-coordinate.public Location offset(Location amount)
amount - The amount to offset.public Location scale(double scaleRatio)
scaleRatio - The ratio by which to scale the results.public int getX()
public int getY()
public String toStringForFilename()
Copyright © 2017. All rights reserved.