Package org.attoparser.config
Enum Class ParseConfiguration.UniqueRootElementPresence
java.lang.Object
java.lang.Enum<ParseConfiguration.UniqueRootElementPresence>
org.attoparser.config.ParseConfiguration.UniqueRootElementPresence
- All Implemented Interfaces:
Serializable
,Comparable<ParseConfiguration.UniqueRootElementPresence>
,Constable
- Enclosing class:
ParseConfiguration
public static enum ParseConfiguration.UniqueRootElementPresence
extends Enum<ParseConfiguration.UniqueRootElementPresence>
Enumeration used for determining the behaviour the parser should have with respect to the presence and number of root elements in the parsed document.
Root elements are the elements that appear at the root of the document (e.g. <html> in complete HTML documents). This enumeration allows requiring that the root element is unique always, requiring it only if a document prolog (XML Declaration or DOCTYPE) is present, or not validating this at all.
This enumeration is used at the ParseConfiguration
class.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
UniqueRootElementPresence
(boolean requiredAlways, boolean dependsOnPrologDoctype) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REQUIRED_ALWAYS
-
DEPENDS_ON_PROLOG_DOCTYPE
-
NOT_VALIDATED
-
-
Field Details
-
requiredAlways
private final boolean requiredAlways -
dependsOnPrologDoctype
private final boolean dependsOnPrologDoctype
-
-
Constructor Details
-
UniqueRootElementPresence
private UniqueRootElementPresence(boolean requiredAlways, boolean dependsOnPrologDoctype)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isRequiredAlways
public boolean isRequiredAlways() -
isDependsOnPrologDoctype
public boolean isDependsOnPrologDoctype()
-