public class ChoiceField extends FieldType
| Modifier and Type | Field and Description |
|---|---|
boolean |
multiple |
boolean |
optional |
java.lang.String[] |
variants |
| Constructor and Description |
|---|
ChoiceField(boolean optional)
Creates new instance with empty String options.
|
ChoiceField(boolean optional,
boolean multiple,
java.lang.String... variants)
Creates new instance of String options.
|
ChoiceField(boolean optional,
java.lang.String... variants)
Creates new instance of String options.
|
ChoiceField(java.lang.String... variants)
Creates new instance of String options.
|
| Modifier and Type | Method and Description |
|---|---|
static ChoiceField |
createRangeChoice(int lowerBound,
int upperBound)
Creates new instance using integer range.
|
static ChoiceField |
createRangeChoice(int lowerBound,
int upperBound,
boolean optional)
Creates new instance using integer range.
|
java.lang.String[] |
getVariants()
Returns field variants.
|
boolean |
isMultiple()
Returns if field is multiple.
|
boolean |
isOptional()
Returns if field is optional.
|
java.lang.String |
toString() |
public final java.lang.String[] variants
public final boolean optional
public final boolean multiple
public ChoiceField(boolean optional,
boolean multiple,
java.lang.String... variants)
optional - if field is optionalmultiple - if field is multiplevariants - the string variantspublic ChoiceField(boolean optional,
java.lang.String... variants)
variants - the string variantsoptional - if field is optionalpublic ChoiceField(java.lang.String... variants)
variants - the string variantspublic ChoiceField(boolean optional)
optional - if field is optionalpublic static ChoiceField createRangeChoice(int lowerBound, int upperBound)
lowerBound - the lower boundupperBound - the upper boundpublic static ChoiceField createRangeChoice(int lowerBound, int upperBound, boolean optional)
lowerBound - the lower boundupperBound - the upper boundoptional - if field is optionalpublic java.lang.String[] getVariants()
public boolean isMultiple()
true if field is multiplepublic boolean isOptional()
true if field is optionalpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2009-2023. Redwood Software Inc. All rights reserved.