net.jxta.impl.document
Class LiteXMLElement.tagRange
java.lang.Object
net.jxta.impl.document.LiteXMLElement.tagRange
- All Implemented Interfaces:
- Comparable<LiteXMLElement.tagRange>
- Enclosing class:
- LiteXMLElement
protected static class LiteXMLElement.tagRange
- extends Object
- implements Comparable<LiteXMLElement.tagRange>
A tagRange is a collection of char ranges useful for describing XML
structures.
startTag
- The range of the opening tag, ie. <tag>
body
- Everything between
startTag
and endTag
.
endTag
- The range of the terminating tag, ie. </tag>.
For empty-element tags the startTag
, body
and endTag
will be equal.
startTag
public LiteXMLElement.charRange startTag
body
public LiteXMLElement.charRange body
endTag
public LiteXMLElement.charRange endTag
LiteXMLElement.tagRange
public LiteXMLElement.tagRange()
LiteXMLElement.tagRange
public LiteXMLElement.tagRange(LiteXMLElement.charRange startTag,
LiteXMLElement.charRange body,
LiteXMLElement.charRange endTag)
equals
public boolean equals(Object aRange)
-
- Overrides:
equals
in class Object
compareTo
public int compareTo(LiteXMLElement.tagRange someRange)
-
- Specified by:
compareTo
in interface Comparable<LiteXMLElement.tagRange>
toString
public String toString()
-
- Overrides:
toString
in class Object
contains
public boolean contains(LiteXMLElement.tagRange someRange)
- Returns true if the
tagRange
specified by someRange is
contained within the body portion of this range.
- Parameters:
someRange
- The range which must be contained within this range.
- Returns:
- true if the specified range is contained with this range
otherwise false.
contains
public boolean contains(LiteXMLElement.charRange someRange)
- Returns true if the
charRange
specified by someRange is
contained within the body portion of this range.
- Parameters:
someRange
- The range which must be contained within this range.
- Returns:
- true if the specified range is contained with this range
otherwise false.
isEmptyElement
public boolean isEmptyElement()
- Returns:
true
if this tagRange represents and empty
element.
isValid
public boolean isValid()
- Returns:
- true if valid