|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.nexttext.behaviour.AbstractAction
net.nexttext.behaviour.control.Repeat
public class Repeat
Repeats an action for a fixed number of times, then stops that action.
The repeat count is incremented whenever the called Action can't complete but returns an event, or when it does complete. Repeat will return event in the ActionResult when the count is incremented, and complete when it reaches its repeat count.
Repeat will have no effect when used with an action that does not return events or complete.
XXXBUG: how could we identify a "Countable" object explicitly?
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action |
|---|
Action.ActionResult |
| Constructor Summary | |
|---|---|
Repeat(Action action)
Repeat an action indefinitely. |
|
Repeat(Action action,
int repetitions)
Repeat an action a certain amount of repetitions. |
|
| Method Summary | |
|---|---|
Action.ActionResult |
behave(TextObject to)
See class description. |
java.util.Map<java.lang.String,Property> |
getRequiredProperties()
The properties that this action requires on a TextObject. |
| Methods inherited from class net.nexttext.behaviour.AbstractAction |
|---|
behave, behave, complete, getDisplayName, makeBehaviour, properties, setDisplayName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Repeat(Action action)
action - the action to repeat
public Repeat(Action action,
int repetitions)
action - the action to repeatrepetitions - the number of times to repeat, use 0 to repeat forever| Method Detail |
|---|
public Action.ActionResult behave(TextObject to)
behave in interface Actionbehave in class AbstractActionpublic java.util.Map<java.lang.String,Property> getRequiredProperties()
AbstractActionRight now this method always returns an empty map, since basic Actions should be restricted to use only the core set of TextObject properties.
If a subclass of Action requires a set of additional properties then it should override this method and return the appropriate Map containing the property objects.
This method is required by the Action interface.
getRequiredProperties in interface ActiongetRequiredProperties in class AbstractAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||