|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hdcookbook.grin.io.builders.VisualRCHandlerCell
public abstract class VisualRCHandlerCell
A cell within a VisualRCHandler. This class is used only for VisualRCHandlerHelper. This class has no public constructor; instead, it has different factory methods for the different cell types.
VisualRCHandlerHelper
Nested Class Summary | |
---|---|
static class |
VisualRCHandlerCell.ActivateCell
|
static class |
VisualRCHandlerCell.LocationRefCell
|
static class |
VisualRCHandlerCell.NullCell
|
static class |
VisualRCHandlerCell.StateCell
|
static class |
VisualRCHandlerCell.StateRefCell
|
static class |
VisualRCHandlerCell.WallCell
|
Field Summary | |
---|---|
protected int |
alternate
|
protected VisualRCHandlerHelper |
helper
|
Method Summary | |
---|---|
abstract java.lang.String |
addState(java.util.Map<java.lang.String,java.lang.Integer> stateMap,
java.util.Set<java.lang.String> dupCheck,
java.util.Map<java.lang.String,VisualRCHandlerCell> cellMap)
Add the state referred to by this cell to the map of states. |
abstract java.lang.String |
check()
Check that this cell is OK. |
abstract VisualRCHandlerCell |
getRefersTo()
Get the cell that this cell refers to. |
int |
getRightLeft()
Get the value for the rightLeft parameter of VisualRCHandler. |
abstract java.lang.String |
getState()
Get the name of the state of this cell, or that this cell refers to. |
abstract int |
getStateNumber(java.util.Map<java.lang.String,java.lang.Integer> states,
java.lang.String stateFrom)
Get the integer number of this state within the states map when navigating to this cell from the numbered state. |
int |
getUpDown()
Get the value for the upDown parameter of VisualRCHandler. |
static VisualRCHandlerCell |
newActivate()
Create a cell that causes an activate. |
static VisualRCHandlerCell |
newLocationRef(int x,
int y)
Create a cell that refers to a state somewhere else in the grid, where that state is specified by an x,y position in the grid (countin from 0). |
static VisualRCHandlerCell |
newNull()
Create a null cell. |
static VisualRCHandlerCell |
newState(java.lang.String state)
Create a cell that represents a new state. |
static VisualRCHandlerCell |
newStateRef(java.lang.String state)
Create a cell that refers to a state that exists somewhere else in the grid. |
static VisualRCHandlerCell |
newWall()
Create a cell that acts as a "wall". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected VisualRCHandlerHelper helper
protected int alternate
Method Detail |
---|
public abstract VisualRCHandlerCell getRefersTo()
public abstract java.lang.String addState(java.util.Map<java.lang.String,java.lang.Integer> stateMap, java.util.Set<java.lang.String> dupCheck, java.util.Map<java.lang.String,VisualRCHandlerCell> cellMap)
public abstract java.lang.String getState()
public abstract int getStateNumber(java.util.Map<java.lang.String,java.lang.Integer> states, java.lang.String stateFrom) throws java.io.IOException
java.io.IOException
- if there's an error in the grid constructionpublic abstract java.lang.String check()
public int getUpDown() throws java.io.IOException
java.io.IOException
- if there's an inconsistency in the handlerpublic int getRightLeft() throws java.io.IOException
java.io.IOException
- if there's an inconsistency in the handlerpublic static VisualRCHandlerCell newState(java.lang.String state)
public static VisualRCHandlerCell newStateRef(java.lang.String state)
public static VisualRCHandlerCell newLocationRef(int x, int y)
public static VisualRCHandlerCell newActivate()
public static VisualRCHandlerCell newWall()
public static VisualRCHandlerCell newNull()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |