java.lang.Object
java.lang.Record
net.luis.utils.io.data.xml.XmlDeclaration
- Record Components:
- version- The version of the xml document
- encoding- The encoding of the xml document
- standalone- Whether the xml document is standalone or not
public record XmlDeclaration(@NotNull Version version, @NotNull Charset encoding, boolean standalone)
extends Record
Represents an xml declaration.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final @NotNull CharsetThe field for theencodingrecord component.private final booleanThe field for thestandalonerecord component.private final @NotNull VersionThe field for theversionrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionXmlDeclaration(@NotNull Version version) Constructs a new xml declaration with the given version and encoding.
 The encoding and standalone flag are set to UTF-8 and false respectively.XmlDeclaration(@NotNull Version version, @NotNull Charset encoding) Constructs a new xml declaration with the given version and encoding.
 The standalone flag is set to false.XmlDeclaration(@NotNull Version version, @NotNull Charset encoding, boolean standalone) Constructs a new xml declaration with the given version, encoding and standalone flag.
- 
Method SummaryModifier and TypeMethodDescription@NotNull Charsetencoding()Returns the value of theencodingrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanReturns the value of thestandalonerecord component.toString()Returns a string representation of this record class.@NotNull Versionversion()Returns the value of theversionrecord component.
- 
Field Details- 
versionThe field for theversionrecord component.
- 
encodingThe field for theencodingrecord component.
- 
standaloneprivate final boolean standaloneThe field for thestandalonerecord component.
 
- 
- 
Constructor Details- 
XmlDeclarationpublic XmlDeclaration(@NotNull @NotNull Version version, @NotNull @NotNull Charset encoding, boolean standalone) Constructs a new xml declaration with the given version, encoding and standalone flag.- Parameters:
- version- The version of the xml document
- encoding- The encoding of the xml document
- standalone- Whether the xml document is standalone or not
- Throws:
- NullPointerException- If the version or encoding is null
- IllegalArgumentException- If the version is invalid
 
- 
XmlDeclarationConstructs a new xml declaration with the given version and encoding.
 The encoding and standalone flag are set to UTF-8 and false respectively.- Parameters:
- version- The version of the xml document
- Throws:
- NullPointerException- If the version is null
- IllegalArgumentException- If the version is invalid
 
- 
XmlDeclarationConstructs a new xml declaration with the given version and encoding.
 The standalone flag is set to false.- Parameters:
- version- The version of the xml document
- encoding- The encoding of the xml document
- Throws:
- NullPointerException- If the version or encoding is null
- IllegalArgumentException- If the version is invalid
 
 
- 
- 
Method Details- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
hashCodepublic int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
versionReturns the value of theversionrecord component.- Returns:
- the value of the versionrecord component
 
- 
encodingReturns the value of theencodingrecord component.- Returns:
- the value of the encodingrecord component
 
- 
standalonepublic boolean standalone()Returns the value of thestandalonerecord component.- Returns:
- the value of the standalonerecord component
 
 
-