S - Superscript typeT - Annotation typepublic abstract class AbstractPersistedTree<S,T> extends AbstractProtelisAST<T>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPersistedTree(Metadata metadata,
java.util.List<ProtelisAST<?>> branches) |
protected |
AbstractPersistedTree(Metadata metadata,
ProtelisAST<?>... branches) |
| Modifier and Type | Method and Description |
|---|---|
protected S |
loadState(ExecutionContext context,
java.util.function.Supplier<S> ifAbsent)
Retrieves the function state from last round, or produces a new state otherwise.
|
protected void |
saveState(ExecutionContext context,
S obj)
Stores the function state for the next round.
|
abstract java.lang.String |
toString() |
branchesToString, branchesToString, eval, evaluate, forEach, forEachWithIndex, getBranch, getBranches, getBranchesNumber, getMetadata, getName, isNullable, stringForclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBytecodeprotected AbstractPersistedTree(Metadata metadata, ProtelisAST<?>... branches)
metadata - A Metadata object containing information about the code that generated this AST node.branches - branches of this AbstractPersistedTreeprotected AbstractPersistedTree(Metadata metadata, java.util.List<ProtelisAST<?>> branches)
metadata - A Metadata object containing information about the code that generated this AST node.branches - branches of this AbstractPersistedTreeprotected final S loadState(ExecutionContext context, java.util.function.Supplier<S> ifAbsent)
context - the ExecutionContextifAbsent - a 0-ary function producing the value if none is storedprotected final void saveState(ExecutionContext context, S obj)
context - the ExecutionContextobj - the statepublic abstract java.lang.String toString()
toString in class AbstractProtelisAST<T>