org.jscience.computing.ai.agents
Class Cell

java.lang.Object
  extended by org.jscience.computing.ai.agents.Cell
Direct Known Subclasses:
CubicCell, HexagonalCell, SquareCell, TriangularCell

public class Cell
extends java.lang.Object

A class representing an abstract cell in a simulated space.


Field Summary
static int CUBIC
          DOCUMENT ME!
static int HEXAGONAL
          DOCUMENT ME!
static int SQUARE
          DOCUMENT ME!
static int TRIANGULAR
          DOCUMENT ME!
 
Constructor Summary
protected Cell(DiscreteEnvironment environment, int[] position)
          Creates a new Cell object.
 
Method Summary
 java.util.Set getContents()
          DOCUMENT ME!
 DiscreteEnvironment getEnvironment()
          DOCUMENT ME!
 java.util.Set getNeighborCells(int method)
          DOCUMENT ME!
 int[] getPosition()
          DOCUMENT ME!
 void setContents(java.util.Set contents)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRIANGULAR

public static final int TRIANGULAR
DOCUMENT ME!

See Also:
Constant Field Values

SQUARE

public static final int SQUARE
DOCUMENT ME!

See Also:
Constant Field Values

HEXAGONAL

public static final int HEXAGONAL
DOCUMENT ME!

See Also:
Constant Field Values

CUBIC

public static final int CUBIC
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

Cell

protected Cell(DiscreteEnvironment environment,
               int[] position)
Creates a new Cell object.

Parameters:
environment - DOCUMENT ME!
position - DOCUMENT ME!
Method Detail

getEnvironment

public DiscreteEnvironment getEnvironment()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getPosition

public int[] getPosition()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getContents

public java.util.Set getContents()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setContents

public void setContents(java.util.Set contents)
DOCUMENT ME!

Parameters:
contents - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

getNeighborCells

public java.util.Set getNeighborCells(int method)
DOCUMENT ME!

Parameters:
method - DOCUMENT ME!
Returns:
DOCUMENT ME!