public abstract class DomainPreferenceConstruct extends EnumConstruct
preferwww, prefernowww, none
.
This class is abstract, subclasses must define a default constructor
which has the node name hardcoded. See EnumConstruct
.AbstractExtension.AttributesHandler
values
attrName
localName, namespace
Constructor and Description |
---|
DomainPreferenceConstruct(java.lang.String nodeName)
Constructs
EnumConstruct to represent the preference setting. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object rhs)
Compares
DomainPreferenceConstruct objects based on the
domain preference that they they hold. |
DomainPreference |
getPreference() |
int |
hashCode()
Returns a hash code which is based on the preference string.
|
void |
setPreference(DomainPreference value) |
void |
setValue(java.lang.String value)
Override
EnumConstruct.setValue(String) to validate that
the supplied value is a one of the accepted domain preferences. |
consumeAttributes, generate, getHandler, getValue, hasValue, isRequired, putAttributes, setRequired
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
public DomainPreferenceConstruct(java.lang.String nodeName)
EnumConstruct
to represent the preference setting.public boolean equals(java.lang.Object rhs)
DomainPreferenceConstruct
objects based on the
domain preference that they they hold.equals
in class ValueConstruct
public int hashCode()
hashCode
in class ValueConstruct
public void setValue(java.lang.String value) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
EnumConstruct.setValue(String)
to validate that
the supplied value is a one of the accepted domain preferences.
See DomainPreference
.setValue
in class EnumConstruct
value
- new value for the value construct or null
to reset.java.lang.NullPointerException
- if the value is null.java.lang.IllegalArgumentException
- if value is not a valid domain
preference none, preferwww, prefernowww
.public void setPreference(DomainPreference value)
public DomainPreference getPreference()