public class Tag extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
canContainBlock()
Gets if this tag can contain block tags.
|
boolean |
equals(Object o) |
boolean |
formatAsBlock()
Gets if this tag should be formatted as a block (or as inline)
|
String |
getName()
Get this tag's name.
|
int |
hashCode() |
boolean |
isBlock()
Gets if this is a block tag.
|
boolean |
isData()
Gets if this tag is a data only tag.
|
boolean |
isEmpty()
Get if this is an empty tag
|
boolean |
isFormListed()
Get if this tag represents a control associated with a form.
|
boolean |
isFormSubmittable()
Get if this tag represents an element that should be submitted with a form.
|
boolean |
isInline()
Gets if this tag is an inline tag.
|
boolean |
isKnownTag()
Get if this is a pre-defined tag, or was auto created on parsing.
|
static boolean |
isKnownTag(String tagName)
Check if this tagname is a known tag.
|
boolean |
isSelfClosing()
Get if this tag is self closing.
|
boolean |
preserveWhitespace()
Get if this tag should preserve whitespace within child text nodes.
|
String |
toString() |
static Tag |
valueOf(String tagName)
Get a Tag by name.
|
static Tag |
valueOf(String tagName,
ParseSettings settings)
Get a Tag by name.
|
public String getName()
public static Tag valueOf(String tagName, ParseSettings settings)
Pre-defined tags (P, DIV etc) will be ==, but unknown tags are not registered and will only .equals().
tagName
- Name of tag, e.g. "p". Case insensitive.settings
- used to control tag name sensitivitypublic static Tag valueOf(String tagName)
Pre-defined tags (P, DIV etc) will be ==, but unknown tags are not registered and will only .equals().
tagName
- Name of tag, e.g. "p". Case sensitive.public boolean isBlock()
public boolean formatAsBlock()
public boolean canContainBlock()
public boolean isInline()
public boolean isData()
public boolean isEmpty()
public boolean isSelfClosing()
public boolean isKnownTag()
public static boolean isKnownTag(String tagName)
tagName
- name of tagpublic boolean preserveWhitespace()
public boolean isFormListed()
public boolean isFormSubmittable()
Copyright © 2017. All rights reserved.