|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascape.model.space.Coordinate
org.ascape.model.space.CoordinateDiscrete
org.ascape.model.space.Coordinate1DDiscrete
org.ascape.model.space.Coordinate2DDiscrete
public class Coordinate2DDiscrete
A location within a two-dimensional discrete space.
| Field Summary |
|---|
| Fields inherited from class org.ascape.model.space.CoordinateDiscrete |
|---|
values |
| Constructor Summary | |
|---|---|
Coordinate2DDiscrete(int[] values)
Creates a 2-dimensional coordinate with the specified position values. |
|
Coordinate2DDiscrete(int x,
int y)
Creates a 2-dimensional coordinate with the specified position values. |
|
| Method Summary | |
|---|---|
Coordinate |
add(Coordinate coordinate)
Adds the location of the supplied coordinate to this coordinate, returning the resulting coordinate. |
double |
getDistance(Coordinate target)
Returns the calculated distance between this coordinate and the supplied coordinate. |
int |
getYValue()
Returns the y value of this coordinate. |
void |
setYValue(int y)
Sets the y value for this coordinate. |
java.lang.String |
toString()
Returns a string representing this coordinate. |
| Methods inherited from class org.ascape.model.space.Coordinate1DDiscrete |
|---|
getValue, getXValue, setValue, setXValue |
| Methods inherited from class org.ascape.model.space.CoordinateDiscrete |
|---|
equals, getDimensionCount, getProduct, getValueAtDimension, getValues, hashCode, setValueAtDimension, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Coordinate2DDiscrete(int[] values)
values - the values
public Coordinate2DDiscrete(int x,
int y)
x - the xy - the y| Method Detail |
|---|
public final int getYValue()
public final void setYValue(int y)
y - the ypublic double getDistance(Coordinate target)
getDistance in class Coordinate1DDiscretetarget - the location to calculate distance to
public Coordinate add(Coordinate coordinate)
add in class Coordinate1DDiscretecoordinate - the coordinate to sum with this one
public java.lang.String toString()
toString in class Coordinate1DDiscrete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||