Class NBRCall<T>
- java.lang.Object
-
- org.protelis.lang.interpreter.impl.AbstractProtelisAST<Field<T>>
-
- org.protelis.lang.interpreter.impl.NBRCall<T>
-
- Type Parameters:
T- field type
- All Implemented Interfaces:
java.io.Serializable,ProtelisAST<Field<T>>,WithBytecode
public final class NBRCall<T> extends AbstractProtelisAST<Field<T>>
Implementation of 'nbr' operator.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NBRCall(Metadata metadata, ProtelisAST<T> body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Field<T>evaluate(ExecutionContext context)Evaluates this AST node.BytecodegetBytecode()java.lang.StringgetName()-
Methods inherited from class org.protelis.lang.interpreter.impl.AbstractProtelisAST
branchesToString, branchesToString, eval, forEach, forEachWithIndex, getBranch, getBranches, getBranchesNumber, getMetadata, isNullable, stringFor, toString
-
-
-
-
Constructor Detail
-
NBRCall
public NBRCall(Metadata metadata, ProtelisAST<T> body)
- Parameters:
metadata- AMetadataobject containing information about the code that generated this AST node.body- body of nbr
-
-
Method Detail
-
evaluate
public Field<T> evaluate(ExecutionContext context)
Description copied from class:AbstractProtelisASTEvaluates this AST node. This method can throw any exception,AbstractProtelisASTtakes care of storing the necessary metadata.- Specified by:
evaluatein classAbstractProtelisAST<Field<T>>- Parameters:
context- the execution context- Returns:
- the result of the evaluation
-
getName
public java.lang.String getName()
Description copied from class:AbstractProtelisAST- Specified by:
getNamein interfaceProtelisAST<T>- Overrides:
getNamein classAbstractProtelisAST<Field<T>>- Returns:
- The name of the operation
-
-