public class ConditionalLoop
extends java.lang.Object
Constructor and Description |
---|
ConditionalLoop()
Empty constructor to provide an empty instance.
|
ConditionalLoop(Bot bot,
int maxLoopCycles)
The maximum amount of loops this class will allow looping for.
|
Modifier and Type | Method and Description |
---|---|
boolean |
condition()
The condition that needs to be valid to continue the loop.
|
int |
getLoopCount() |
boolean |
getResult()
Determines whether or not the loop finished before it exceeded its maximum number of loop cycles.
|
void |
setResult(boolean result) |
ConditionalLoop |
start()
Starts the loop.
|
public ConditionalLoop()
public ConditionalLoop(Bot bot, int maxLoopCycles)
maxLoopCycles
- The maximum number of cycles to loop.public boolean condition()
public ConditionalLoop start()
public boolean getResult()
public void setResult(boolean result)
public int getLoopCount()