Package 

Class Choice

  • All Implemented Interfaces:

    
    public class Choice<T extends Object>
    
                        

    Simple utility for making choices.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Choice.Companion
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Choice()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean addOption(T option) Adds an option to the available options when choosing.
      final Boolean addOptions(T option) Adds options to the available options when choosing.
      final Boolean addOptions(Iterable<T> pOptions) Adds options to the available options when choosing.
      T choose() Chooses one of the available options and returns it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Choice

        Choice()
    • Method Detail

      • addOption

         final Boolean addOption(T option)

        Adds an option to the available options when choosing.

        Parameters:
        option - Option to add
      • addOptions

         final Boolean addOptions(T option)

        Adds options to the available options when choosing.

        Parameters:
        option - Option to add
      • addOptions

         final Boolean addOptions(Iterable<T> pOptions)

        Adds options to the available options when choosing.

        Parameters:
        pOptions - Options to add
      • choose

         T choose()

        Chooses one of the available options and returns it.