Package org.epics.pvdata.property
Interface MultiChoice
-
public interface MultiChoiceInterface for multiple choice data. The implementation keeps a bitMask which selects an array of string values.- Author:
- mrk
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMultiChoice.ChoicesThe interface returned by getSelectedChoices;
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clear the bitMask.byte[]getBitMask()Get the current byte array for the bitMask.String[]getChoices()Get the current complete set of choices.MultiChoice.ChoicesgetSelectedChoices()Get the currently selected set of bits.intregisterChoice(String choice)Register a new choice string.voidsetBit(int index)Set a selected bit.
-
-
-
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
-
-