java.lang.Object
com.machinezoo.pushmode.dom.DomContent
com.machinezoo.pushmode.dom.DomText
- All Implemented Interfaces:
-
Cloneable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Unicode expansion of &.static final String
Unicode expansion of '.static final String
Unicode expansion of  .static final String
Unicode expansion of  .static final String
Unicode expansion of >.static final String
Unicode expansion of ‎.static final String
Unicode expansion of <.static final String
Unicode expansion of .static final String
Unicode expansion of ".static final String
Unicode expansion of ‏.static final String
Unicode expansion of ­.static final String
Unicode expansion of  .static final String
Unicode expansion of ‍.static final String
Unicode expansion of ‌. -
Constructor Summary
-
Method Summary
Methods inherited from class com.machinezoo.pushmode.dom.DomContent
toString
-
Field Details
-
quot
Unicode expansion of ".- See Also:
-
amp
Unicode expansion of &.- See Also:
-
apos
Unicode expansion of '.- See Also:
-
lt
Unicode expansion of <.- See Also:
-
gt
Unicode expansion of >.- See Also:
-
nbsp
Unicode expansion of .- See Also:
-
shy
Unicode expansion of ­.- See Also:
-
ensp
Unicode expansion of  .- See Also:
-
emsp
Unicode expansion of  .- See Also:
-
thinsp
Unicode expansion of  .- See Also:
-
zwnj
Unicode expansion of ‌.- See Also:
-
zwj
Unicode expansion of ‍.- See Also:
-
lrm
Unicode expansion of ‎.- See Also:
-
rlm
Unicode expansion of ‏.- See Also:
-
-
Constructor Details
-
DomText
Creates DOM text node. If the parameter isnull
, the created text node will contain an empty string.- Parameters:
-
text
- content of the newly created text node
-
-
Method Details
-
text
Gets content of this text node. Text is always non-null even if the constructor was called withnull
argument. If this is a descendant ofDomElement
orDomFragment
, the text is guaranteed to be non-empty.- Specified by:
-
text
in classDomContent
- Returns:
- content of this text node
-
clone
Clones the text node (no-op). Implementation of this method is required by parentDomContent
. SinceDomText
is immutable, this method just returnsthis
.- Specified by:
-
clone
in classDomContent
- Returns:
-
this
-
equals
Compares texts of twoDomText
nodes. If the other object is not aDomText
node, this method returns false.- Overrides:
-
equals
in classDomContent
- Parameters:
-
object
- object to compare this text node with - Returns:
-
true
if the two text nodes are equal,false
otherwise
-
hashCode
public int hashCode()Computes hash code of the text node. The returned hash code is equal to the hash code oftext()
.- Overrides:
-
hashCode
in classDomContent
- Returns:
- hash code of the text node
-
freeze
Freezes this DOM tree node (no-op). SinceDomText
is immutable by nature, this method has no effect. It is implemented, because it is required by parentDomContent
.- Specified by:
-
freeze
in classDomContent
- Returns:
-
this
-