Class BooleanFormField

    • Method Detail

      • getValueAsBoolean

        public boolean getValueAsBoolean()
        Get the value of the booelan field. Note that, if no explicit boolean value is provided, in the form of "true", "false", "0", or "1", then the default value of a boolean field is false, according to XEP-0004 ยง 3.3.
        Returns:
        the boolean value of this form field.
      • getValueAsBooleanOrNull

        public java.lang.Boolean getValueAsBooleanOrNull()
        Get the value of the boolean field or maybe 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.
        Returns:
        the boolean value of this form field or null if no value was explicitly provided.
        Since:
        4.4.5
        See Also:
        getValueAsBoolean()