Enum NodeType
- java.lang.Object
-
- java.lang.Enum<NodeType>
-
- org.pepstock.charba.client.dom.enums.NodeType
-
- All Implemented Interfaces:
Serializable
,Comparable<NodeType>
public enum NodeType extends Enum<NodeType>
Enumerates all possible types of aBaseNode
.
An integer is representing the type of the node.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ATTRIBUTE_NODE
CDATA_SECTION_NODE
COMMENT_NODE
DOCUMENT_FRAGMENT_NODE
DOCUMENT_NODE
DOCUMENT_TYPE_NODE
ELEMENT_NODE
ENTITY_NODE
ENTITY_REFERENCE_NODE
NOTATION_NODE
PROCESSING_INSTRUCTION_NODE
TEXT_NODE
UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodeType
getByType(int nodeType)
Returns the type of node comparing the argument and its integer representation.int
getType()
Returns the type integer representation of node.static NodeType
valueOf(String name)
Returns the enum constant of this type with the specified name.static NodeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ELEMENT_NODE
public static final NodeType ELEMENT_NODE
-
ATTRIBUTE_NODE
public static final NodeType ATTRIBUTE_NODE
-
TEXT_NODE
public static final NodeType TEXT_NODE
-
CDATA_SECTION_NODE
public static final NodeType CDATA_SECTION_NODE
-
ENTITY_REFERENCE_NODE
public static final NodeType ENTITY_REFERENCE_NODE
-
ENTITY_NODE
public static final NodeType ENTITY_NODE
-
PROCESSING_INSTRUCTION_NODE
public static final NodeType PROCESSING_INSTRUCTION_NODE
-
COMMENT_NODE
public static final NodeType COMMENT_NODE
-
DOCUMENT_NODE
public static final NodeType DOCUMENT_NODE
-
DOCUMENT_TYPE_NODE
public static final NodeType DOCUMENT_TYPE_NODE
-
DOCUMENT_FRAGMENT_NODE
public static final NodeType DOCUMENT_FRAGMENT_NODE
-
NOTATION_NODE
public static final NodeType NOTATION_NODE
-
UNKNOWN
public static final NodeType UNKNOWN
-
-
Method Detail
-
values
public static NodeType[] 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 (NodeType c : NodeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NodeType 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 nameNullPointerException
- if the argument is null
-
getType
public int getType()
Returns the type integer representation of node.- Returns:
- the type integer representation
-
getByType
public static NodeType getByType(int nodeType)
Returns the type of node comparing the argument and its integer representation.- Parameters:
nodeType
- the type integer representation of node- Returns:
- the type of node
-
-