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 aListSingleFormField
andListMultiFormField
.
-
-
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 boolean
equals(java.lang.Object obj)
java.lang.String
getElementName()
Returns the root element name.java.lang.String
getLabel()
Returns the label that represents the option.java.lang.String
getNamespace()
Returns the root element XML namespace.javax.xml.namespace.QName
getQName()
FormField.Value
getValue()
Returns the value of the option.java.lang.String
getValueString()
Returns the string representation of the value of the option.int
hashCode()
java.lang.String
toString()
XmlStringBuilder
toXML(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:
toString
in classjava.lang.Object
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
getQName
public javax.xml.namespace.QName getQName()
- Specified by:
getQName
in interfaceFullyQualifiedElement
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-