Environments
Class Coords

java.lang.Object
  |
  +--Environments.Coords

public class Coords
extends java.lang.Object

This class is used to represent the coordinates of an agent or a cell in a Woods Environment. It is useful if you want to have a graphical display of the environment.

Author:
Olivier Sigaud and Pierre Gérard.

Field Summary
private  int x
           
private  int y
           
 
Constructor Summary
Coords()
           
Coords(Environments.Coords source)
           
Coords(int xinit, int yinit)
           
 
Method Summary
 boolean equals(Environments.Coords coord)
           
 double getX()
           
 int getXI()
           
 double getY()
           
 int getYI()
           
 void set(int x1, int y1)
           
 void setX(int x1)
           
 void setY(int y1)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

private int x

y

private int y
Constructor Detail

Coords

public Coords(Environments.Coords source)
Parameters:
source -

Coords

public Coords(int xinit,
              int yinit)
Parameters:
xinit -
yinit -

Coords

public Coords()
Method Detail

set

public final void set(int x1,
                      int y1)
Parameters:
x1 -
y1 -

setX

public final void setX(int x1)
Parameters:
x1 -

setY

public final void setY(int y1)
Parameters:
y1 -

getXI

public final int getXI()
Returns:
int

getYI

public final int getYI()
Returns:
int

getX

public final double getX()
Returns:
double

getY

public final double getY()
Returns:
double

equals

public final boolean equals(Environments.Coords coord)
Parameters:
coord -
Returns:
boolean

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String