Package com.helger.xml.serialize.write
Enum EXMLSerializeIndent
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,Serializable,Comparable<EXMLSerializeIndent>,java.lang.constant.Constable
public enum EXMLSerializeIndent
extends Enum<EXMLSerializeIndent>
implements com.helger.commons.id.IHasID<String>
Determines the indentation and alignment mode of XML serialization. Alignment
means: newlines after certain elements. Indent means: adding blanks at the
beginning of the line to reflect the tree structure of an XML document more
visibly.
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo indent but alignBoth indent and align.Indent but no align.Neither indent nor align -
Method Summary
Modifier and TypeMethodDescriptionstatic EXMLSerializeIndentgetFromIDOrNull(String sID) getID()booleanisAlign()booleanisIndent()static EXMLSerializeIndentReturns the enum constant of this type with the specified name.static EXMLSerializeIndent[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
Neither indent nor align -
ALIGN_ONLY
No indent but align -
INDENT_ONLY
Indent but no align. -
INDENT_AND_ALIGN
Both indent and align.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getID
- Specified by:
getIDin interfacecom.helger.commons.id.IHasID<String>
-
isIndent
public boolean isIndent()- Returns:
trueif the XML output should be formatted nicely
-
isAlign
public boolean isAlign()- Returns:
trueif newlines should be emitted
-
getWithoutIndent
-
getWithIndent
-
getWithoutAlign
-
getWithAlign
-
getFromIDOrNull
-