java.lang.Object
net.luis.utils.io.data.xml.XmlElement
net.luis.utils.io.data.xml.XmlValue
- All Implemented Interfaces:
- DefaultValueGetter,- ValueGetter
Represents a xml value element.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a new xml value with the given name and boolean value.Constructs a new xml value with the given name and number value.Constructs a new xml value with the given name and string value.
 The value will be escaped automatically.XmlValue(@NotNull String name, @NotNull XmlAttributes attributes, boolean value) Constructs a new xml value with the given name, attributes and boolean value.XmlValue(@NotNull String name, @NotNull XmlAttributes attributes, @Nullable Number value) Constructs a new xml value with the given name, attributes and number value.XmlValue(@NotNull String name, @NotNull XmlAttributes attributes, @Nullable String value) Constructs a new xml value with the given name, attributes and string value.
 The value will be escaped automatically.
- 
Method SummaryModifier and TypeMethodDescriptionboolean@NotNull StringReturns the value which is hold by this object as a string.protected @NotNull StringReturns the type of the xml element.
 This is used internally for error messages.@NotNull StringReturns the raw unescaped value of the element.@NotNull StringReturns the unescaped value of the element.inthashCode()booleanChecks if the xml element is self-closing.@NotNull StringReturns a string representation of this value.Methods inherited from class net.luis.utils.io.data.xml.XmlElementaddAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, getAsXmlContainer, getAsXmlValue, getAttribute, getAttributeAs, getAttributeAsBoolean, getAttributeAsByte, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsLong, getAttributeAsNumber, getAttributeAsShort, getAttributeAsString, getAttributes, getName, isXmlContainer, isXmlValue, toBaseString, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.luis.utils.util.getter.DefaultValueGettergetAs, getAsBoolean, getAsByte, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsNumber, getAsShortMethods inherited from interface net.luis.utils.util.getter.ValueGettergetAs, getAsBoolean, getAsByte, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsNumber, getAsShort
- 
Field Details- 
valueThe value of the xml element.
 
- 
- 
Constructor Details- 
XmlValueConstructs a new xml value with the given name and boolean value.- Parameters:
- name- The name of the xml element
- value- The value of the xml element
- Throws:
- NullPointerException- If the name is null
 
- 
XmlValueConstructs a new xml value with the given name and number value.- Parameters:
- name- The name of the xml element
- value- The value of the xml element
- Throws:
- NullPointerException- If the name is null
 
- 
XmlValueConstructs a new xml value with the given name and string value.
 The value will be escaped automatically.- Parameters:
- name- The name of the xml element
- value- The value of the xml element
- Throws:
- NullPointerException- If the name is null
 
- 
XmlValuepublic XmlValue(@NotNull @NotNull String name, @NotNull @NotNull XmlAttributes attributes, boolean value) Constructs a new xml value with the given name, attributes and boolean value.- Parameters:
- name- The name of the xml element
- attributes- The attributes of the xml element
- value- The value of the xml element
- Throws:
- NullPointerException- If the name or attributes are null
 
- 
XmlValuepublic XmlValue(@NotNull @NotNull String name, @NotNull @NotNull XmlAttributes attributes, @Nullable @Nullable Number value) Constructs a new xml value with the given name, attributes and number value.- Parameters:
- name- The name of the xml element
- attributes- The attributes of the xml element
- value- The value of the xml element
 
- 
XmlValuepublic XmlValue(@NotNull @NotNull String name, @NotNull @NotNull XmlAttributes attributes, @Nullable @Nullable String value) Constructs a new xml value with the given name, attributes and string value.
 The value will be escaped automatically.- Parameters:
- name- The name of the xml element
- attributes- The attributes of the xml element
- value- The value of the xml element
- Throws:
- NullPointerException- If the name or attributes are null
 
 
- 
- 
Method Details- 
getElementTypeDescription copied from class:XmlElementReturns the type of the xml element.
 This is used internally for error messages.- Overrides:
- getElementTypein class- XmlElement
- Returns:
- The type of the xml element
 
- 
isSelfClosingpublic boolean isSelfClosing()Description copied from class:XmlElementChecks if the xml element is self-closing.- Overrides:
- isSelfClosingin class- XmlElement
- Returns:
- Always false
 
- 
getRawValueReturns the raw unescaped value of the element.- Returns:
- The raw value
 
- 
getUnescapedValueReturns the unescaped value of the element.- Returns:
- The unescaped value
 
- 
getAsStringReturns the value which is hold by this object as a string.
 This method is equivalent togetUnescapedValue().- Specified by:
- getAsStringin interface- ValueGetter
- Returns:
- The value as a string
 
- 
equals- Overrides:
- equalsin class- XmlElement
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- XmlElement
 
- 
toStringReturns a string representation of this value.- Overrides:
- toStringin class- XmlElement
- Parameters:
- config- The xml config to use for the string representation
- Returns:
- The string representation
- Throws:
- NullPointerException- If the config is null
 
 
-