lane.sente
Class Location

java.lang.Object
  |
  +--lane.sente.Location

public class Location
extends java.lang.Object

The purpose of this class is to hold information about the current location of any Element


Constructor Summary
Location(int x, int y)
          2D regular constructor
Location(int x, int y, int z)
          regular constructor
Location(int minX, int maxX, int minY, int maxY)
          two D random location constructor
Location(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
          constructor for a random location within a range of locations
Location(Location loc)
          copy constructor
 
Method Summary
 int getX()
          the method to retieve the X value
 int getY()
          the method to retieve the Y value
 int getZ()
          the method to retieve the Z value
 Location nextLocation(Velocity v)
          The method used to set the new location from a given velocity
 void setX(int i)
          the method to set the X location
 void setY(int i)
          the method to set the Y value
 void setZ(int i)
          the method to set the Z value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Location

public Location(int minX,
                int maxX,
                int minY,
                int maxY,
                int minZ,
                int maxZ)
constructor for a random location within a range of locations
Parameters:
minX - The minimum possible X value
maxX - The maximum possible X value
minY - The minimum possible Y value
maxY - The maximum possible Y value
minZ - The minimum possible Z value
maxZ - The maximum possible Z value

Location

public Location(int x,
                int y,
                int z)
regular constructor
Parameters:
x - The x location
y - The y location
z - The z location

Location

public Location(int minX,
                int maxX,
                int minY,
                int maxY)
two D random location constructor
Parameters:
minX - The minimum possible X value
maxX - The maximum possible X value
minY - The minimum possible Y value
maxY - The maximum possible Y value

Location

public Location(int x,
                int y)
2D regular constructor
Parameters:
x - The x location
y - The y location

Location

public Location(Location loc)
copy constructor
Parameters:
loc - The location to be duplicated
Method Detail

getX

public int getX()
the method to retieve the X value
Returns:
the x location

getY

public int getY()
the method to retieve the Y value
Returns:
the y location

getZ

public int getZ()
the method to retieve the Z value
Returns:
the z location

setX

public void setX(int i)
the method to set the X location
Parameters:
i - The new X value

setY

public void setY(int i)
the method to set the Y value
Parameters:
i - The new Y value

setZ

public void setZ(int i)
the method to set the Z value
Parameters:
i - The new Z value

nextLocation

public Location nextLocation(Velocity v)
The method used to set the new location from a given velocity
Parameters:
v - The velocity from which to determine the new location