Class Node.SkipResult

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SkipResult​(boolean skipped, java.lang.String reason)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Node.SkipResult doNotSkip()
      Factory for creating do not skip results.
      java.util.Optional<java.lang.String> getReason()
      Get the reason that execution of the context should be skipped, if available.
      boolean isSkipped()
      Whether execution of the context should be skipped.
      static Node.SkipResult skip​(java.lang.String reason)
      Factory for creating skipped results.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • alwaysExecuteSkipResult

        private static final Node.SkipResult alwaysExecuteSkipResult
      • skipped

        private final boolean skipped
      • reason

        private final java.util.Optional<java.lang.String> reason
    • Constructor Detail

      • SkipResult

        private SkipResult​(boolean skipped,
                           java.lang.String reason)
    • Method Detail

      • skip

        public static Node.SkipResult skip​(java.lang.String reason)
        Factory for creating skipped results.

        A context that is skipped will be not be executed.

        Parameters:
        reason - the reason that the context should be skipped, may be null
        Returns:
        a skipped SkipResult with the given reason
      • doNotSkip

        public static Node.SkipResult doNotSkip()
        Factory for creating do not skip results.

        A context that is not skipped will be executed as normal.

        Returns:
        a do not skip SkipResult
      • isSkipped

        public boolean isSkipped()
        Whether execution of the context should be skipped.
        Returns:
        true if the execution should be skipped
      • getReason

        public java.util.Optional<java.lang.String> getReason()
        Get the reason that execution of the context should be skipped, if available.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object