Interface MultiChoice


  • public interface MultiChoice
    Interface for multiple choice data. The implementation keeps a bitMask which selects an array of string values.
    Author:
    mrk
    • Method Detail

      • getBitMask

        byte[] getBitMask()
        Get the current byte array for the bitMask.
        Returns:
        the long array. The bits are ordered by byte and within a byte by bit where the low order bit is the first bit in the byte.
      • getChoices

        String[] getChoices()
        Get the current complete set of choices.
        Returns:
        the string array of choices.
      • getSelectedChoices

        MultiChoice.Choices getSelectedChoices()
        Get the currently selected set of bits.
        Returns:
        the Choices interface
      • setBit

        void setBit​(int index)
        Set a selected bit.
        Parameters:
        index - the bit index
      • clear

        void clear()
        Clear the bitMask.
      • registerChoice

        int registerChoice​(String choice)
        Register a new choice string. If the string is already a choice then this method just returns the index of the already present choice.
        Parameters:
        choice - the new choice
        Returns:
        the index for the choice