public class BooleanFormField extends SingleValueFormField
| Modifier and Type | Class and Description |
|---|---|
static class |
BooleanFormField.Builder |
FormField.Description, FormField.Option, FormField.Required, FormField.Type, FormField.Value| Modifier | Constructor and Description |
|---|---|
protected |
BooleanFormField(BooleanFormField.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
BooleanFormField.Builder |
asBuilder() |
java.lang.String |
getValue() |
boolean |
getValueAsBoolean()
Get the value of the booelan field.
|
java.lang.Boolean |
getValueAsBooleanOrNull()
Get the value of the boolean field or maybe
null. |
getRawValue, getRawValues, getValues, populateExtraXmlChildElementsasHiddenFormTypeFieldIfPossible, booleanBuilder, builder, buildHiddenFormType, equals, fixedBuilder, fixedBuilder, getDescription, getElementName, getFieldName, getFirstValue, getFirstValueAsDate, getFormFieldChildElement, getFormFieldChildElements, getFormFieldChildElements, getLabel, getNamespace, getQName, getRawValueCharSequences, getType, getValuesAsString, getVariable, hashCode, hasValueSet, hiddenBuilder, ifPossibleAs, ifPossibleAsOrThrow, isRequired, jidMultiBuilder, jidSingleBuilder, listMultiBuilder, listSingleBuilder, textMultiBuilder, textPrivateBuilder, textSingleBuilder, toXML, toXMLprotected BooleanFormField(BooleanFormField.Builder builder)
public java.lang.String getValue()
getValue in class SingleValueFormFieldpublic boolean getValueAsBoolean()
false, according to
XEP-0004 ยง 3.3.public java.lang.Boolean getValueAsBooleanOrNull()
null. Note that you usually want to use
getValueAsBoolean() instead of this method, as getValueAsBoolean() considers the default value
of boolean fields. That is, boolean form fields have the value false if not explicitly set to
something else.null if no value was explicitly provided.getValueAsBoolean()public BooleanFormField.Builder asBuilder()