Class UnwrapException

All Implemented Interfaces:
Serializable

public class UnwrapException extends RuntimeException
Exception representing the case where calling code attempts to unwrap an empty Option instance.
See Also:
Serialized Form
  • Constructor Details

    • UnwrapException

      public UnwrapException(@NotNull @NotNull Option<?> option)
  • Method Details

    • getOption

      public Option<?> getOption()
      Returns the Option instance where the exception originated.
      Returns:
      The Option instance where the exception originated.