Class NodeResult
-
- All Implemented Interfaces:
public class NodeResultEnum to store the result of executing a node
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNodeResult.OKDefault value to make a node as successfully executed
public final classNodeResult.VALUEMarks a node as successfully executed with a result
public final classNodeResult.ERRORMarks a node as unsuccessfully executed with an error
-
Method Summary
Modifier and Type Method Description final BooleanisTruthy()If this value represents a truthy value (not NULL, false ot empty) final NodeResult.VALUEtruthy()Converts this node result into a truthy value final NodeResultand(NodeResult result)Return the AND of this result with the given one final NodeResultor(NodeResult result)Return the OR of this result with the given one final Result<NodeValue, String>valueOrError()Unwraps the result into a value, or returns the error result as an error final StringasString()Converts the result value to a string final NodeValueasValue()Returns the associated value if there is one final UIntasNumber()If the result is a number, returns it final List<String>asSList()If the result is a list of Strings, returns it StringstrForm()Safe form to put in the plan output -
-
Method Detail
-
isTruthy
final Boolean isTruthy()
If this value represents a truthy value (not NULL, false ot empty)
-
truthy
final NodeResult.VALUE truthy()
Converts this node result into a truthy value
-
and
final NodeResult and(NodeResult result)
Return the AND of this result with the given one
-
or
final NodeResult or(NodeResult result)
Return the OR of this result with the given one
-
valueOrError
final Result<NodeValue, String> valueOrError()
Unwraps the result into a value, or returns the error result as an error
-
-
-
-