|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use IUpdateStrategy | |
---|---|
ballworld.model | |
ballworld.model.strategy |
Uses of IUpdateStrategy in ballworld.model |
---|
Fields in ballworld.model declared as IUpdateStrategy | |
---|---|
private IUpdateStrategy |
Ball._updateStrategy
The strategy used to update the state of the ball |
Methods in ballworld.model that return IUpdateStrategy | |
---|---|
IUpdateStrategy |
Ball.getUpdateStrategy()
Returns the current strategy of this Ball |
IUpdateStrategy |
BallModel.loadUpdateStrategy(java.lang.String className)
Uses dynamic class loading to load and instantiate an IUpdateStrategy implementation, given its class name. |
IUpdateStrategy |
IUpdateStrategyFac.make()
Instantiate the specific IUpdateStrategy for which this factory is defined. |
Methods in ballworld.model with parameters of type IUpdateStrategy | |
---|---|
void |
BallModel.loadBall(IUpdateStrategy updateStrategy,
IPaintStrategy paintStrategy)
Load a ball into the system, where the ball uses the given update strategy instance. |
void |
Ball.setUpdateStrategy(IUpdateStrategy strategy)
Sets the current strategy of this Ball to the given strategy |
void |
BallModel.switchSwitcherStrategy(IUpdateStrategy strat)
Change the switcher strategy's decoree to the supplied strategy |
Constructors in ballworld.model with parameters of type IUpdateStrategy | |
---|---|
Ball(java.awt.Point p,
int r,
java.awt.Point v,
java.awt.Color c,
java.awt.Component container,
IUpdateStrategy updateStrategy,
IPaintStrategy paintStrategy)
Initializes this Ball to a given center, radius, color, containing walls, and the NullStrategy to move in a straight line. |
Uses of IUpdateStrategy in ballworld.model.strategy |
---|
Classes in ballworld.model.strategy that implement IUpdateStrategy | |
---|---|
class |
BreathingStrategy
Strategy to change the context ball's radius in a random sinusoidal manner |
class |
Change1Strategy
A composite strategy that switches the context's strategy to a Change2Strategy after a certain number of updates. |
class |
Change2Strategy
This strategy does nothing (i.e. |
class |
ColorStrategy
Strategy to randomly change the context ball's color. |
class |
CurveStrategy
Strategy to make the ball curve in a circle |
class |
DrunkenStrategy
A strategy that, at every update, randomly selects from a set of 4 strategies to be run. |
class |
MultiStrategy
A composite strategy of two strategies. |
class |
StraightStrategy
Simple no-op strategy, which, alone, will make the ball go in a straight line. |
class |
SwitcherStrategy
Decorator design pattern strategy that provides an indirection layer and encapsulation over another strategy, enabling it to be switched without disturbing the context ball. |
class |
WanderStrategy
Strategy that randomly changes the velocity of the context ball by adding random values to it. |
Fields in ballworld.model.strategy declared as IUpdateStrategy | |
---|---|
private IUpdateStrategy |
MultiStrategy._s1
One of the composee strategies |
private IUpdateStrategy |
MultiStrategy._s2
Another one of the composee strategies |
private IUpdateStrategy |
SwitcherStrategy._strategy
The decoree strategy. |
private IUpdateStrategy |
DrunkenStrategy.s1
One of the strategies to choose from |
private IUpdateStrategy |
Change1Strategy.s1
One of the composee strategies |
private IUpdateStrategy |
DrunkenStrategy.s2
One of the strategies to choose from |
private IUpdateStrategy |
Change1Strategy.s2
One of the composee strategies |
private IUpdateStrategy |
DrunkenStrategy.s3
One of the strategies to choose from |
private IUpdateStrategy |
Change1Strategy.s3
One of the composee strategies |
private IUpdateStrategy |
DrunkenStrategy.s4
One of the strategies to choose from |
Methods in ballworld.model.strategy with parameters of type IUpdateStrategy | |
---|---|
void |
SwitcherStrategy.setStrategy(IUpdateStrategy newStrategy)
Set the decoree strategy to a new value |
Constructors in ballworld.model.strategy with parameters of type IUpdateStrategy | |
---|---|
MultiStrategy(IUpdateStrategy s1,
IUpdateStrategy s2)
Constructor for the class |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |