Class Condition.Result<U>

java.lang.Object
net.lucypoulton.squirtgun.command.condition.Condition.Result<U>
Type Parameters:
U - the output type of the test
Enclosing interface:
Condition<T extends PermissionHolder,U extends PermissionHolder>

public static class Condition.Result<U> extends Object
The result of a test.
  • Constructor Details

    • Result

      public Result(boolean successful, U result, String error)
  • Method Details

    • isSuccessful

      public boolean isSuccessful()
      Whether the test passed.
    • isFailure

      public final boolean isFailure()
      Whether the test failed - inverse of isSuccessful().
    • getResult

      public U getResult()
      Gets the result of the test. When the test has failed, this may be null.
    • getError

      public String getError()
      Gets the error, if any, that this test encountered, When the test has passed, this may be null.