|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Range
Super-interface of a hierarchy of interfaces that provide for the classification, and manipulation, of the complete contents of any XML markup. The hierarchy of interfaces looks like this:
The name "Range" comes from the idea that this represents a segment, an area, a span of consecutive characters, or, in other words, a range of characters, within an XML document. It makes no assertion about what the characters in its range of the document represent - that's what the sub-interfaces are for.
Method Summary | |
---|---|
Object |
clone()
|
boolean |
isEmptyTag()
Returns true if this range of characters constitutes an "empty" tag, for example:
"<br/>". |
boolean |
isEndTag()
Returns true if this range of characters constitutes an "end" tag, for example:
"</body>". |
boolean |
isStartTag()
Returns true if this range of characters constitutes a "start" tag, for example:
"<body>". |
boolean |
isTagWithAttributes()
Returns true if this range of characters constitutes a "start" or an "empty" tag; in other words, if
this is a tag that can possess attributes. |
boolean |
rangeEquals(Characters Chars)
Test this range of characters for equality with another set of characters. |
String |
toString()
Returns a String representation of this range of characters. |
void |
write(PrintWriter Out)
Write this range of characters to the specified PrintWriter . |
Method Detail |
---|
boolean rangeEquals(Characters Chars)
Chars
- The set of characters to be tested for equality with this range of characters.
true
if the characters in this range exactly match the characters in
the Chars
parameter, false
otherwise.String toString()
String
representation of this range of characters.
toString
in class Object
String
representation of this range of characters.Object clone()
void write(PrintWriter Out) throws IOException
PrintWriter
.
Out
- This range of characters is written to this PrintWriter
.
IOException
- If anything goes wrong while writing.boolean isStartTag()
true
if this range of characters constitutes a "start" tag, for example:
"<body>". The same determination can be made with the test "instanceof StartTag
",
but using this method is faster.
true
if this range of characters constitutes a "start" tag,
false
otherwise.boolean isEndTag()
true
if this range of characters constitutes an "end" tag, for example:
"</body>". The same determination can be made with the test "instanceof EndTag
",
but using this method is faster.
true
if this range of characters constitutes an "end" tag,
false
otherwise.boolean isEmptyTag()
true
if this range of characters constitutes an "empty" tag, for example:
"<br/>". The same determination can be made with the test "instanceof EmptyTag
",
but using this method is faster.
true
if this range of characters constitutes an "empty" tag,
false
otherwise.boolean isTagWithAttributes()
true
if this range of characters constitutes a "start" or an "empty" tag; in other words, if
this is a tag that can possess attributes. The same determination can be made with the test
"instanceof TagWithAttributes
", but using this method is faster. Note that this method returns
true
for all "start" and "empty" tags; whether or not they actually do possess attributes is
irrelevant.
true
if this range of characters constitutes a "start" or an "empty" tag,
false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |