Interface UiResult<R>

Type Parameters:
R - the answer type
All Known Implementing Classes:
UiResult.Closed, UiResult.Completed

public sealed interface UiResult<R> permits UiResult.Completed<R>, UiResult.Closed<R>
Outcome of a shown intent.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    The intent ended without an answer.
    static final record 
    The player answered.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Whether an answer was submitted.
    The value.
  • Method Details

    • isCompleted

      default boolean isCompleted()
      Whether an answer was submitted.
    • value

      R value()
      The value. @throws IllegalStateException if UiResult.Closed