Package org.jivesoftware.smackx.xdata
Class FormField.Option
- java.lang.Object
-
- org.jivesoftware.smackx.xdata.FormField.Option
-
- All Implemented Interfaces:
Element,FullyQualifiedElement,NamedElement,XmlLangElement
- Enclosing class:
- FormField
public static final class FormField.Option extends java.lang.Object implements FullyQualifiedElement
Represents the available options of aListSingleFormFieldandListMultiFormField.
-
-
Constructor Summary
Constructors Constructor Description Option(java.lang.String value)Option(java.lang.String label, java.lang.String value)Option(java.lang.String label, FormField.Value value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetElementName()Returns the root element name.java.lang.StringgetLabel()Returns the label that represents the option.java.lang.StringgetNamespace()Returns the root element XML namespace.javax.xml.namespace.QNamegetQName()FormField.ValuegetValue()Returns the value of the option.java.lang.StringgetValueString()Returns the string representation of the value of the option.inthashCode()java.lang.StringtoString()XmlStringBuildertoXML(XmlEnvironment enclosingNamespace)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Constructor Detail
-
Option
public Option(java.lang.String value)
-
Option
public Option(java.lang.String label, java.lang.String value)
-
Option
public Option(java.lang.String label, FormField.Value value)
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Returns the label that represents the option.- Returns:
- the label that represents the option.
-
getValue
public FormField.Value getValue()
Returns the value of the option.- Returns:
- the value of the option.
-
getValueString
public java.lang.String getValueString()
Returns the string representation of the value of the option.- Returns:
- the value of the option.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceFullyQualifiedElement- Returns:
- the namespace.
-
getQName
public javax.xml.namespace.QName getQName()
- Specified by:
getQNamein interfaceFullyQualifiedElement
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-