Constructor and Description |
---|
Forever()
Construct a new forever loop.
|
Forever(java.util.function.Consumer<Forever> code)
Construct a new forever loop with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
Forever |
append(java.util.function.Consumer<Forever> code)
Append the given code to the end of the looping code of this.
|
protected void |
loop()
The looping cod.
|
public Forever()
public Forever(java.util.function.Consumer<Forever> code)
code
- the first looping codejava.lang.NullPointerException
- if the given code is nullpublic Forever append(java.util.function.Consumer<Forever> code)
Loop
protected void loop()
Loop
Loop.next(Object)
inside the loop to invoke the code of this loop. Break the loop if it returned false.