|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.fish.tests.Test_GenericFish.TestTwoWayLocalEnv
Field Summary | |
(package private) int |
blocked
|
(package private) int |
count
|
Constructor Summary | |
private |
Test_GenericFish.TestTwoWayLocalEnv()
|
Method Summary | |
void |
drawFish(AFish fish,
java.awt.Graphics2D g,
java.awt.Component comp)
Draw the fish on the graphics object. |
java.lang.Object |
execute(AGlobalEnv.ILocalEnvVisitor visitor,
java.lang.Object param)
Execute a visitor on this local environment. |
void |
removeFish(AFish fish)
Remove the fish from the environment. |
void |
setBlocked(int i)
|
void |
setState(ILocalEnvState state)
Set state. |
java.lang.Object |
tryBreedFwd(AFish fish,
ILambda blockedCmd,
ILambda openCmd)
Attempt to breed the fish forward, which may or may not be successful. |
java.lang.Object |
tryMoveFwd(AFish fish,
ILambda blockedCmd,
ILambda openCmd)
Attempt to move the fish forward, which may or may not be successful. |
void |
turnRight(AFish fish,
double radians)
Turn the fish radians to the right. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sysModel.env.ILocalEnv |
toString |
Field Detail |
int count
int blocked
Constructor Detail |
private Test_GenericFish.TestTwoWayLocalEnv()
Method Detail |
public void setBlocked(int i)
public java.lang.Object tryMoveFwd(AFish fish, ILambda blockedCmd, ILambda openCmd)
ILocalEnv
tryMoveFwd
in interface ILocalEnv
fish
- AFish to moveblockedCmd
- lambda to apply if blockedopenCmd
- lambda to apply if open
public java.lang.Object tryBreedFwd(AFish fish, ILambda blockedCmd, ILambda openCmd)
ILocalEnv
tryBreedFwd
in interface ILocalEnv
fish
- AFish to moveblockedCmd
- lambda to apply if blockedopenCmd
- lambda to apply if open
public void drawFish(AFish fish, java.awt.Graphics2D g, java.awt.Component comp)
ILocalEnv
drawFish
in interface ILocalEnv
fish
- AFish to drawFishg
- graphics object to drawFish oncomp
- component to drawFish onpublic void turnRight(AFish fish, double radians)
ILocalEnv
turnRight
in interface ILocalEnv
fish
- AFish to turnradians
- radians to turnpublic void removeFish(AFish fish)
ILocalEnv
removeFish
in interface ILocalEnv
fish
- AFish to removepublic java.lang.Object execute(AGlobalEnv.ILocalEnvVisitor visitor, java.lang.Object param)
ILocalEnv
execute
in interface ILocalEnv
visitor
- visitor to executeparam
- visitor-specific parameter
public void setState(ILocalEnvState state)
ILocalEnv
setState
in interface ILocalEnv
state
- new state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |