Interface Result

All Known Subinterfaces:
DemotionResult, PlayerLoginProcessEvent, PromotionResult
All Known Implementing Classes:
DataMutateResult, DemotionResult.Status, PromotionResult.Status
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Result
Represents a generic result, which can either be successful or fail.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Result
    Instance of Result which always reports failure.
    static final Result
    Instance of Result which always reports success.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets if the operation which produced this result completed successfully.
  • Field Details

    • GENERIC_SUCCESS

      static final Result GENERIC_SUCCESS
      Instance of Result which always reports success.
    • GENERIC_FAILURE

      static final Result GENERIC_FAILURE
      Instance of Result which always reports failure.
  • Method Details

    • wasSuccessful

      boolean wasSuccessful()
      Gets if the operation which produced this result completed successfully.
      Returns:
      if the result indicates a success