|
JDOM 2.0.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdom2.output.support.WalkerPRESERVE
public class WalkerPRESERVE
This Walker implementation walks a list of Content in it's original RAW format. There is no text manipulation, and all content will be returned as the input type. In other words, next() will never be null, and text() will always be null.
Constructor Summary | |
---|---|
WalkerPRESERVE(java.util.List<? extends Content> content)
Create a Walker that preserves all content in its raw state. |
Method Summary | |
---|---|
boolean |
hasNext()
Behaves similarly to to a regular Iterator |
boolean |
isAllText()
If all the content in this walker is empty, or if whatever content is available is Text-like. |
boolean |
isAllWhitespace()
If all the content is Text-like ( Walker.isAllText() returns true), and
additionally that any content is either Text or CDATA, and that the
values of these Text/CDATA members are all XML Whitespace. |
boolean |
isCDATA()
If the previous next() method returned null, then this will indicate whether the current text() value is CDATA or regular Text. |
Content |
next()
Similar to an Iterator, but null return values need special treatment. |
java.lang.String |
text()
If the previous call to next() returned null, then this will return the required text to be processed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WalkerPRESERVE(java.util.List<? extends Content> content)
content
- the content to walk.Method Detail |
---|
public boolean isAllText()
Walker
Text-like content is considered to be Text
, CDATA
,
EntityRef
, or any (potentially mixed) sequence of these types,
but no other types.
isAllText
in interface Walker
public boolean hasNext()
Walker
hasNext
in interface Walker
public Content next()
Walker
next
in interface Walker
public java.lang.String text()
Walker
text
in interface Walker
public boolean isCDATA()
Walker
isCDATA
in interface Walker
public boolean isAllWhitespace()
Walker
Walker.isAllText()
returns true), and
additionally that any content is either Text or CDATA, and that the
values of these Text/CDATA members are all XML Whitespace.
isAllWhitespace
in interface Walker
|
JDOM 2.0.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |