java.lang.Object
java.lang.Record
net.luis.utils.io.data.xml.XmlConfig
- Record Components:
- strict- Whether to use strict xml parsing when reading
- prettyPrint- Whether to pretty print the xml (write-only)
- indent- The string to use for indentation (write-only)
- allowAttributes- Whether to allow attributes in xml elements
- simplifyValues- Whether to simplify xml values (write-only)
- charset- The charset to use for reading and writing
public record XmlConfig(boolean strict, @WriteOnly boolean prettyPrint, @WriteOnly("prettyPrint") @NotNull String indent, boolean allowAttributes, @WriteOnly boolean simplifyValues, @NotNull Charset charset)
extends Record
Configuration for reading and writing xml elements.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theallowAttributesrecord component.private final @NotNull CharsetThe field for thecharsetrecord component.static final XmlConfigThe default xml configuration.
 Strict: true
 Pretty print: true
 Indent: "\t"
 Allow attributes: true
 Simplify values: true
 Charset: UTF-8private final @NotNull StringThe field for theindentrecord component.private final booleanThe field for theprettyPrintrecord component.private final booleanThe field for thesimplifyValuesrecord component.private final booleanThe field for thestrictrecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns the value of theallowAttributesrecord component.@NotNull Charsetcharset()Returns the value of thecharsetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringindent()Returns the value of theindentrecord component.booleanReturns the value of theprettyPrintrecord component.booleanReturns the value of thesimplifyValuesrecord component.booleanstrict()Returns the value of thestrictrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
strictprivate final boolean strictThe field for thestrictrecord component.
- 
prettyPrintprivate final boolean prettyPrintThe field for theprettyPrintrecord component.
- 
indentThe field for theindentrecord component.
- 
allowAttributesprivate final boolean allowAttributesThe field for theallowAttributesrecord component.
- 
simplifyValuesprivate final boolean simplifyValuesThe field for thesimplifyValuesrecord component.
- 
charsetThe field for thecharsetrecord component.
- 
DEFAULTThe default xml configuration.
 Strict: true
 Pretty print: true
 Indent: "\t"
 Allow attributes: true
 Simplify values: true
 Charset: UTF-8
 
- 
- 
Constructor Details- 
XmlConfigpublic XmlConfig(boolean strict, boolean prettyPrint, @NotNull @NotNull String indent, boolean allowAttributes, boolean simplifyValues, @NotNull @NotNull Charset charset) Constructs a new xml configuration.- Parameters:
- strict- Whether to use strict xml parsing when reading
- prettyPrint- Whether to pretty print the xml (write-only)
- indent- The string to use for indentation (write-only)
- allowAttributes- Whether to allow attributes in xml elements
- simplifyValues- Whether to simplify xml values (write-only)
- charset- The charset to use for reading and writing
- Throws:
- NullPointerException- If the indent or charset is null
 
 
- 
- 
Method Details- 
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.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
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 '=='.
- 
strictpublic boolean strict()Returns the value of thestrictrecord component.- Returns:
- the value of the strictrecord component
 
- 
prettyPrintpublic boolean prettyPrint()Returns the value of theprettyPrintrecord component.- Returns:
- the value of the prettyPrintrecord component
 
- 
indentReturns the value of theindentrecord component.- Returns:
- the value of the indentrecord component
 
- 
allowAttributespublic boolean allowAttributes()Returns the value of theallowAttributesrecord component.- Returns:
- the value of the allowAttributesrecord component
 
- 
simplifyValuespublic boolean simplifyValues()Returns the value of thesimplifyValuesrecord component.- Returns:
- the value of the simplifyValuesrecord component
 
- 
charsetReturns the value of thecharsetrecord component.- Returns:
- the value of the charsetrecord component
 
 
-