Package com.helger.xml.serialize.write
Enum EXMLSerializeVersion
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,Serializable,Comparable<EXMLSerializeVersion>,java.lang.constant.Constable
public enum EXMLSerializeVersion
extends Enum<EXMLSerializeVersion>
implements com.helger.commons.id.IHasID<String>
XML serialization version.
- 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 Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EXMLSerializeVersiongetFromIDOrNull(String sID) static EXMLSerializeVersiongetFromXMLVersionOrThrow(EXMLVersion eXMLVersion) Get theEXMLSerializeVersionfrom the specifiedEXMLVersion.getID()getXMLVersionOrDefault(EXMLVersion eDefault) booleanisHTML()booleanisXML()static EXMLSerializeVersionReturns the enum constant of this type with the specified name.static EXMLSerializeVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
XML_10
XML 1.0 -
XML_11
XML 1.1 -
HTML
HTML4 and XHTML
-
-
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>
-
isXML
public boolean isXML()- Returns:
trueif this is an XML version (1.0 or 1.1)
-
isHTML
public boolean isHTML()- Returns:
trueif this is HTML (HTML or XHTML)
-
getXMLVersionOrDefault
-
getXMLVersionString
- Returns:
nullif no XML version is required, the respective version string otherwise.
-
getFromXMLVersionOrThrow
@Nonnull public static EXMLSerializeVersion getFromXMLVersionOrThrow(@Nonnull EXMLVersion eXMLVersion) Get theEXMLSerializeVersionfrom the specifiedEXMLVersion.- Parameters:
eXMLVersion- XML version to query. May not benull.- Returns:
- Never
null.
-
getFromIDOrNull
-