Enum Class TagContent
- All Implemented Interfaces:
Serializable
,Comparable<TagContent>
,Constable
- Since:
- 3.0.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInnerContent
(AbstractHtml parent, String content) Removes all children from the given parent tag and appends the given content on the given parent tag either as text or HTML based on the enum constantvoid
addInnerContents
(AbstractHtml parent, String... contents) Removes all children from the given parent tag and appends the given contents on the given parent tag either as text or HTML based on the enum constantboolean
appendChild
(AbstractHtml parent, String content) appends the given content on the given parent tag either as text or HTML based on the enum constantvoid
appendChildren
(AbstractHtml parent, String... contents) appends the given contents on the given parent tag either as text or HTML based on the enum constantstatic <R extends AbstractHtml>
RappendHtml
(R parent, String content) Appends content in the given parent object as the last child.static <R extends AbstractHtml>
RappendText
(R parent, String content) Appends content in the given parent object as the last child.static <R extends AbstractHtml>
RAdds inner content for the given parent object, children of parent will be removed if already exists.boolean
insertAfter
(AbstractHtml parent, String content) Inserts the given content after given parent tag either as text or HTML based on the enum constant.boolean
insertAfter
(AbstractHtml parent, String... contents) Inserts the given contents after given parent tag either as text or HTML based on the enum constant.boolean
insertBefore
(AbstractHtml parent, String content) Inserts the given content before given parent tag either as text or HTML based on the enum constant.boolean
insertBefore
(AbstractHtml parent, String... contents) Inserts the given contents before given parent tag either as text or HTML based on the enum constant.void
prependChild
(AbstractHtml parent, String content) prepends the given content on the given parent tag either as text or HTML based on the enum constantvoid
prependChildren
(AbstractHtml parent, String... contents) prepends the given contents on the given parent tag either as text or HTML based on the enum constantstatic <R extends AbstractHtml>
RprependHtml
(R parent, String content) Prepends content in the given parent object as the first child.static <R extends AbstractHtml>
RprependText
(R parent, String content) Prepends content in the given parent object as the first child.void
replaceChildren
(AbstractHtml parent, String content) Removes all children from the given parent tag and appends the given content on the given parent tag either as text or HTML based on the enum constantvoid
replaceChildren
(AbstractHtml parent, String... contents) Removes all children from the given parent tag and appends the given contents on the given parent tag either as text or HTML based on the enum constantstatic <R extends AbstractHtml>
RAdds inner content for the given parent object, children of parent will be removed if already exists.static TagContent
Returns the enum constant of this class with the specified name.static TagContent[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TEXT
content type is plain text -
HTML
content type is HTML
-
-
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
-
text
Adds inner content for the given parent object, children of parent will be removed if already exists.- Parameters:
parent
-content
-- Returns:
- parent
- Since:
- 3.0.13
-
prependText
Prepends content in the given parent object as the first child.- Parameters:
parent
-- Returns:
- parent
- Since:
- 3.0.13
-
appendText
Appends content in the given parent object as the last child.- Parameters:
parent
-- Returns:
- parent
- Since:
- 3.0.13
-
html
Adds inner content for the given parent object, children of parent will be removed if already exists. It internally marks the given content type as html.- Parameters:
parent
-- Returns:
- parent
- Since:
- 3.0.13
-
prependHtml
Prepends content in the given parent object as the first child. It internally marks the given content type as html.- Parameters:
parent
-- Returns:
- parent
- Since:
- 3.0.13
-
appendHtml
Appends content in the given parent object as the last child. It internally marks the given content type as html.- Parameters:
parent
-- Returns:
- parent
- Since:
- 3.0.13
-
appendChildren
appends the given contents on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.contents
- contents to append to the given parent tag.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
appendChild
appends the given content on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.content
- content to append to the given parent tag.- Returns:
- true if appended
- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
prependChild
prepends the given content on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.content
- content to prepend to the given parent tag.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
prependChildren
prepends the given contents on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.contents
- contents to prepend to the given parent tag.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
insertBefore
Inserts the given content before given parent tag either as text or HTML based on the enum constant. There must be a parent for the given parent tag.- Parameters:
parent
- the tag on which the operation to be done.content
- content to insert before the given parent tag.- Returns:
- true if inserted
- Since:
- 3.0.2
-
insertBefore
Inserts the given contents before given parent tag either as text or HTML based on the enum constant. There must be a parent for the given parent tag.- Parameters:
parent
- the tag on which the operation to be done.contents
- contents to insert before the given parent tag.- Returns:
- true if inserted
- Since:
- 3.0.2
-
insertAfter
Inserts the given content after given parent tag either as text or HTML based on the enum constant. There must be a parent for the given parent tag.- Parameters:
parent
- the tag on which the operation to be done.content
- content to insert after the given parent tag.- Returns:
- true if inserted
- Since:
- 3.0.2
-
insertAfter
Inserts the given contents after given parent tag either as text or HTML based on the enum constant. There must be a parent for the given parent tag.- Parameters:
parent
- the tag on which the operation to be done.contents
- contents to insert after the given parent tag.- Returns:
- true if inserted
- Since:
- 3.0.2
-
replaceChildren
Removes all children from the given parent tag and appends the given content on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.content
- replacement content for the children of the given parent.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
replaceChildren
Removes all children from the given parent tag and appends the given contents on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.contents
- replacement contents for the children of the given parent.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
addInnerContent
Removes all children from the given parent tag and appends the given content on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.content
- replacement content for the children of the given parent.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-
addInnerContents
Removes all children from the given parent tag and appends the given contents on the given parent tag either as text or HTML based on the enum constant- Parameters:
parent
- the tag on which the operation to be done.contents
- replacement contents for the children of the given parent.- Throws:
InvalidTagException
- if the given tag instance is not supported for this operation.- Since:
- 3.0.2
-