Class NodeResult

  • All Implemented Interfaces:

    
    public class NodeResult
    
                        

    Enum to store the result of executing a node

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class NodeResult.OK

      Default value to make a node as successfully executed

      public final class NodeResult.VALUE

      Marks a node as successfully executed with a result

      public final class NodeResult.ERROR

      Marks a node as unsuccessfully executed with an error

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean isTruthy() If this value represents a truthy value (not NULL, false ot empty)
      final NodeResult.VALUE truthy() Converts this node result into a truthy value
      final NodeResult and(NodeResult result) Return the AND of this result with the given one
      final NodeResult or(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 String asString() Converts the result value to a string
      final NodeValue asValue() Returns the associated value if there is one
      final UInt asNumber() If the result is a number, returns it
      final List<String> asSList() If the result is a list of Strings, returns it
      String strForm() Safe form to put in the plan output
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait