edu.brook.ascape.model
Class Coordinate1DDiscrete

java.lang.Object
  |
  +--edu.brook.ascape.model.Coordinate
        |
        +--edu.brook.ascape.model.CoordinateDiscrete
              |
              +--edu.brook.ascape.model.Coordinate1DDiscrete
Direct Known Subclasses:
Coordinate2DDiscrete

public class Coordinate1DDiscrete
extends CoordinateDiscrete

A location within a one-dimensional discrete space.

Since:
1.0
Version:
1.2
See Also:
Serialized Form

Fields inherited from class edu.brook.ascape.model.CoordinateDiscrete
values
 
Constructor Summary
Coordinate1DDiscrete()
          Creates a 1-dimensional coordinate.
Coordinate1DDiscrete(int value)
          Creates a 1-dimensional coordinate with the specified position.
Coordinate1DDiscrete(int[] values)
          Creates a 1-dimensional coordinate with the specified postion values.
 
Method Summary
 float getDistance(Coordinate coordinate)
           
 int getValue()
          Returns the number of dimensions for this lattice.
 int getXValue()
          Returns the x value of this coordinate.
 void setValue(int x)
          Sets the value for this coordinate.
 void setXValue(int x)
          Sets the y value for this coordinate.
 java.lang.String toString()
          Returns a string representing this coordinate.
 
Methods inherited from class edu.brook.ascape.model.CoordinateDiscrete
getDimensionCount, getProduct, getValueAtDimension, getValues, setValueAtDimension, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Coordinate1DDiscrete

public Coordinate1DDiscrete()
Creates a 1-dimensional coordinate.

Coordinate1DDiscrete

public Coordinate1DDiscrete(int[] values)
Creates a 1-dimensional coordinate with the specified postion values.

Coordinate1DDiscrete

public Coordinate1DDiscrete(int value)
Creates a 1-dimensional coordinate with the specified position.
Method Detail

getDistance

public float getDistance(Coordinate coordinate)
Overrides:
getDistance in class Coordinate

getValue

public final int getValue()
Returns the number of dimensions for this lattice.

setValue

public final void setValue(int x)
Sets the value for this coordinate.

getXValue

public final int getXValue()
Returns the x value of this coordinate.

setXValue

public final void setXValue(int x)
Sets the y value for this coordinate.

toString

public java.lang.String toString()
Returns a string representing this coordinate.
Overrides:
toString in class CoordinateDiscrete

(c) 1998-2000 The Brookings Insitution
Webpage