Package com.helger.html
Enum EHTMLElement
- java.lang.Object
-
- java.lang.Enum<EHTMLElement>
-
- com.helger.html.EHTMLElement
-
- All Implemented Interfaces:
Serializable,Comparable<EHTMLElement>
public enum EHTMLElement extends Enum<EHTMLElement>
Contains a list of all HTML element names.- Author:
- Philip Helger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AABBRADDRESSAPPLETDeprecated.AREAARTICLEASIDEAUDIOBBASEBDIBDOBLOCKQUOTEBODYBRBUTTONCANVASCAPTIONCENTERDeprecated.CITECODECOLCOLGROUPCOMMANDDATADATALISTDDDELDETAILSDFNDIALOGDIRDeprecated.DIVDLDTEMEMBEDFIELDSETFIGCAPTIONFIGUREFONTDeprecated.FOOTERFORMFRAMEDeprecated.FRAMESETDeprecated.H1H2H3H4H5H6HEADHEADERHGROUPHRHTMLIIFRAMEIMGINPUTINSKBDLABELLEGENDLILINKMAINMAPMARKMENUMENUITEMDeprecated.METAMETERNAVNOBRDeprecated.NOSCRIPTOBJECTOLOPTGROUPOPTIONOUTPUTPPARAMPICTUREPREPROGRESSQRPRTRUBYSSAMPSCRIPTSECTIONSELECTSLOTSMALLSOURCESPANSTRONGSTYLESUBSUMMARYSUPTABLETBODYTDTEMPLATETEXTAREATFOOTTHTHEADTIMETITLETRTRACKUULVARVIDEOWBR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetElementName()StringgetElementNameUpperCase()static EHTMLElementgetFromTagNameOrNull(String sTagName)Get theEHTMLElementfor the passed tag name using case insensitive comparestatic StringgetUnifiedHTMLElementName(String sElementName)booleanisFlowElement()static booleanisHTMLTagName(String sTagName)Check if the passed tag is an HTML tag name.booleanisMetadataElement()booleanisPhrasingElement()static booleanisTagThatMayBeSelfClosed(String sElementName)Check if the passed element may be self closed when creating HTML.static booleanisTagThatMayNotBeSelfClosed(String sElementName)Check if the passed element may not be self closed when creating HTML.booleanmayBeSelfClosed()booleanmayNotBeSelfClosed()static EHTMLElementvalueOf(String name)Returns the enum constant of this type with the specified name.static EHTMLElement[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
A
public static final EHTMLElement A
-
ABBR
public static final EHTMLElement ABBR
-
ADDRESS
public static final EHTMLElement ADDRESS
-
APPLET
@Deprecated(forRemoval=false) public static final EHTMLElement APPLET
Deprecated.
-
AREA
public static final EHTMLElement AREA
-
ARTICLE
public static final EHTMLElement ARTICLE
-
ASIDE
public static final EHTMLElement ASIDE
-
AUDIO
public static final EHTMLElement AUDIO
-
B
public static final EHTMLElement B
-
BASE
public static final EHTMLElement BASE
-
BDI
public static final EHTMLElement BDI
-
BDO
public static final EHTMLElement BDO
-
BLOCKQUOTE
public static final EHTMLElement BLOCKQUOTE
-
BODY
public static final EHTMLElement BODY
-
BR
public static final EHTMLElement BR
-
BUTTON
public static final EHTMLElement BUTTON
-
CANVAS
public static final EHTMLElement CANVAS
-
CAPTION
public static final EHTMLElement CAPTION
-
CENTER
@Deprecated(forRemoval=false) public static final EHTMLElement CENTER
Deprecated.
-
CITE
public static final EHTMLElement CITE
-
CODE
public static final EHTMLElement CODE
-
COL
public static final EHTMLElement COL
-
COLGROUP
public static final EHTMLElement COLGROUP
-
COMMAND
public static final EHTMLElement COMMAND
-
DATA
public static final EHTMLElement DATA
-
DATALIST
public static final EHTMLElement DATALIST
-
DD
public static final EHTMLElement DD
-
DEL
public static final EHTMLElement DEL
-
DETAILS
public static final EHTMLElement DETAILS
-
DFN
public static final EHTMLElement DFN
-
DIALOG
public static final EHTMLElement DIALOG
-
DIR
@Deprecated(forRemoval=false) public static final EHTMLElement DIR
Deprecated.
-
DIV
public static final EHTMLElement DIV
-
DL
public static final EHTMLElement DL
-
DT
public static final EHTMLElement DT
-
EM
public static final EHTMLElement EM
-
EMBED
public static final EHTMLElement EMBED
-
FIELDSET
public static final EHTMLElement FIELDSET
-
FIGCAPTION
public static final EHTMLElement FIGCAPTION
-
FIGURE
public static final EHTMLElement FIGURE
-
FONT
@Deprecated(forRemoval=false) public static final EHTMLElement FONT
Deprecated.
-
FOOTER
public static final EHTMLElement FOOTER
-
FORM
public static final EHTMLElement FORM
-
FRAME
@Deprecated(forRemoval=false) public static final EHTMLElement FRAME
Deprecated.
-
FRAMESET
@Deprecated(forRemoval=false) public static final EHTMLElement FRAMESET
Deprecated.
-
H1
public static final EHTMLElement H1
-
H2
public static final EHTMLElement H2
-
H3
public static final EHTMLElement H3
-
H4
public static final EHTMLElement H4
-
H5
public static final EHTMLElement H5
-
H6
public static final EHTMLElement H6
-
HEAD
public static final EHTMLElement HEAD
-
HEADER
public static final EHTMLElement HEADER
-
HGROUP
public static final EHTMLElement HGROUP
-
HR
public static final EHTMLElement HR
-
HTML
public static final EHTMLElement HTML
-
I
public static final EHTMLElement I
-
IFRAME
public static final EHTMLElement IFRAME
-
IMG
public static final EHTMLElement IMG
-
INS
public static final EHTMLElement INS
-
INPUT
public static final EHTMLElement INPUT
-
KBD
public static final EHTMLElement KBD
-
LABEL
public static final EHTMLElement LABEL
-
LEGEND
public static final EHTMLElement LEGEND
-
LI
public static final EHTMLElement LI
-
LINK
public static final EHTMLElement LINK
-
MAIN
public static final EHTMLElement MAIN
-
MAP
public static final EHTMLElement MAP
-
MARK
public static final EHTMLElement MARK
-
MENU
public static final EHTMLElement MENU
-
MENUITEM
@Deprecated(forRemoval=false) public static final EHTMLElement MENUITEM
Deprecated.
-
META
public static final EHTMLElement META
-
METER
public static final EHTMLElement METER
-
NAV
public static final EHTMLElement NAV
-
NOBR
@Deprecated(forRemoval=false) public static final EHTMLElement NOBR
Deprecated.
-
NOSCRIPT
public static final EHTMLElement NOSCRIPT
-
OBJECT
public static final EHTMLElement OBJECT
-
OL
public static final EHTMLElement OL
-
OPTGROUP
public static final EHTMLElement OPTGROUP
-
OPTION
public static final EHTMLElement OPTION
-
OUTPUT
public static final EHTMLElement OUTPUT
-
P
public static final EHTMLElement P
-
PARAM
public static final EHTMLElement PARAM
-
PICTURE
public static final EHTMLElement PICTURE
-
PRE
public static final EHTMLElement PRE
-
PROGRESS
public static final EHTMLElement PROGRESS
-
RP
public static final EHTMLElement RP
-
RT
public static final EHTMLElement RT
-
RUBY
public static final EHTMLElement RUBY
-
Q
public static final EHTMLElement Q
-
S
public static final EHTMLElement S
-
SAMP
public static final EHTMLElement SAMP
-
SCRIPT
public static final EHTMLElement SCRIPT
-
SECTION
public static final EHTMLElement SECTION
-
SELECT
public static final EHTMLElement SELECT
-
SLOT
public static final EHTMLElement SLOT
-
SMALL
public static final EHTMLElement SMALL
-
SOURCE
public static final EHTMLElement SOURCE
-
SPAN
public static final EHTMLElement SPAN
-
STRONG
public static final EHTMLElement STRONG
-
SUB
public static final EHTMLElement SUB
-
SUMMARY
public static final EHTMLElement SUMMARY
-
SUP
public static final EHTMLElement SUP
-
STYLE
public static final EHTMLElement STYLE
-
TABLE
public static final EHTMLElement TABLE
-
TBODY
public static final EHTMLElement TBODY
-
TD
public static final EHTMLElement TD
-
TEXTAREA
public static final EHTMLElement TEXTAREA
-
TEMPLATE
public static final EHTMLElement TEMPLATE
-
TFOOT
public static final EHTMLElement TFOOT
-
TH
public static final EHTMLElement TH
-
THEAD
public static final EHTMLElement THEAD
-
TIME
public static final EHTMLElement TIME
-
TITLE
public static final EHTMLElement TITLE
-
TR
public static final EHTMLElement TR
-
TRACK
public static final EHTMLElement TRACK
-
U
public static final EHTMLElement U
-
UL
public static final EHTMLElement UL
-
VAR
public static final EHTMLElement VAR
-
VIDEO
public static final EHTMLElement VIDEO
-
WBR
public static final EHTMLElement WBR
-
-
Method Detail
-
values
public static EHTMLElement[] 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 (EHTMLElement c : EHTMLElement.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EHTMLElement 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
-
getUnifiedHTMLElementName
@Nonnull public static String getUnifiedHTMLElementName(@Nonnull String sElementName)
-
getElementName
@Nonnull @Nonempty public String getElementName()
- Returns:
- The defined element name in any lower case. Neither
nullnor empty.
-
getElementNameUpperCase
@Nonnull @Nonempty public String getElementNameUpperCase()
- Returns:
- The defined element name in upper case characters. Neither
nullnor empty.
-
mayBeSelfClosed
public boolean mayBeSelfClosed()
- Returns:
trueif this element may be self-closed (e.g. <br />), andfalseif not (e.g. <link...></link>)
-
mayNotBeSelfClosed
public boolean mayNotBeSelfClosed()
- Returns:
trueif this element may not be self-closed (e.g. <link...></link>),falseif it may be self-closed (e.g. <br />)
-
isFlowElement
public boolean isFlowElement()
-
isMetadataElement
public boolean isMetadataElement()
-
isPhrasingElement
public boolean isPhrasingElement()
-
isTagThatMayBeSelfClosed
public static boolean isTagThatMayBeSelfClosed(@Nullable String sElementName)
Check if the passed element may be self closed when creating HTML.- Parameters:
sElementName- The name of the tag to validate.- Returns:
trueif the tag may not be self closed.
-
isTagThatMayNotBeSelfClosed
public static boolean isTagThatMayNotBeSelfClosed(@Nullable String sElementName)
Check if the passed element may not be self closed when creating HTML.- Parameters:
sElementName- The name of the tag to validate.- Returns:
trueif the tag may not be self closed.
-
isHTMLTagName
public static boolean isHTMLTagName(@Nullable String sTagName)
Check if the passed tag is an HTML tag name.- Parameters:
sTagName- The case sensitive tag name to check.- Returns:
trueif it is a known HTML tag,falseotherwise.
-
getFromTagNameOrNull
@Nullable public static EHTMLElement getFromTagNameOrNull(@Nullable String sTagName)
Get theEHTMLElementfor the passed tag name using case insensitive compare- Parameters:
sTagName- The case sensitive tag name to check.- Returns:
- The matching
EHTMLElementornullif no such element is present.
-
-