Class AlreadySelectedException

All Implemented Interfaces:
Serializable

public class AlreadySelectedException extends ParseException
Thrown when more than one option in an option group has been provided.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      This exception serialVersionUID.
      See Also:
    • group

      private final OptionGroup group
      The option group selected.
    • option

      private final Option option
      The option that triggered the exception.
  • Constructor Details

    • AlreadySelectedException

      public AlreadySelectedException(OptionGroup group, Option option)
      Constructs a new AlreadySelectedException for the specified option group.
      Parameters:
      group - the option group already selected
      option - the option that triggered the exception
      Since:
      1.2
    • AlreadySelectedException

      public AlreadySelectedException(String message)
      Constructs a new AlreadySelectedException with the specified detail message.
      Parameters:
      message - the detail message
    • AlreadySelectedException

      private AlreadySelectedException(String message, OptionGroup group, Option option)
  • Method Details

    • getOption

      public Option getOption()
      Gets the option that was added to the group and triggered the exception.
      Returns:
      the related option
      Since:
      1.2
    • getOptionGroup

      public OptionGroup getOptionGroup()
      Gets the option group where another option has been selected.
      Returns:
      the related option group
      Since:
      1.2