Enum ItemChoiceSelectionType

  • All Implemented Interfaces:
    Serializable, Comparable<ItemChoiceSelectionType>

    public enum ItemChoiceSelectionType
    extends Enum<ItemChoiceSelectionType>
    Describes restrictions placed on the customer's ability to select items from the targeted set. Generally, this is a restriction on how many choices can be selected for a single add-to-cart request and, potentially, how quantity is distributed among multiple selected choices.
    Author:
    Chris Kittrell (ckittrell)
    See Also:
    ItemChoice
    • Enum Constant Detail

      • CHOOSE_ONE

        public static final ItemChoiceSelectionType CHOOSE_ONE
        The customer can only choose one of the specified target items. All quantity conditions (whether variable or fixed) will only be applied to the selected choice so that only 1 choice will be included in the add-to-cart request.
      • CHOOSE_MULTIPLE

        public static final ItemChoiceSelectionType CHOOSE_MULTIPLE
        The customer can choose multiple of the specified target items. Quantity can be spread across multiple options leading to multiple of the choices being added to cart at once.
    • Method Detail

      • values

        public static ItemChoiceSelectionType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ItemChoiceSelectionType c : ItemChoiceSelectionType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ItemChoiceSelectionType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null