Enum EXMLSerializeIndent

  • All Implemented Interfaces:
    com.helger.commons.id.IHasID<String>, Serializable, Comparable<EXMLSerializeIndent>

    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
    • Method Detail

      • values

        public static EXMLSerializeIndent[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EXMLSerializeIndent c : EXMLSerializeIndent.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EXMLSerializeIndent valueOf​(String name)
        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 name
        NullPointerException - if the argument is null
      • getID

        @Nonnull
        @Nonempty
        public String getID()
        Specified by:
        getID in interface com.helger.commons.id.IHasID<String>
      • isIndent

        public boolean isIndent()
        Returns:
        true if the XML output should be formatted nicely
      • isAlign

        public boolean isAlign()
        Returns:
        true if newlines should be emitted