Project JXTA

net.jxta.impl.document
Class LiteXMLElement.tagRange

java.lang.Object
  extended bynet.jxta.impl.document.LiteXMLElement.tagRange
All Implemented Interfaces:
Comparable
Enclosing class:
LiteXMLElement

protected static class LiteXMLElement.tagRange
extends Object
implements Comparable

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.


Field Summary
 LiteXMLElement.charRange body
           
 LiteXMLElement.charRange endTag
           
 LiteXMLElement.charRange startTag
           
 
Constructor Summary
LiteXMLElement.tagRange()
           
LiteXMLElement.tagRange(LiteXMLElement.charRange startTag, LiteXMLElement.charRange body, LiteXMLElement.charRange endTag)
           
 
Method Summary
 int compareTo(Object aRange)
          
 boolean contains(LiteXMLElement.charRange someRange)
          Returns true if the charRange specified by someRange is contained within the body portion of this range.
 boolean contains(LiteXMLElement.tagRange someRange)
          Returns true if the tagRange specified by someRange is contained within the body portion of this range.
 boolean equals(Object aRange)
          
 boolean isEmptyElement()
          Returns true if this tagRange represents and empty element.
 boolean isValid()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

startTag

public LiteXMLElement.charRange startTag

body

public LiteXMLElement.charRange body

endTag

public LiteXMLElement.charRange endTag
Constructor Detail

LiteXMLElement.tagRange

public LiteXMLElement.tagRange()

LiteXMLElement.tagRange

public LiteXMLElement.tagRange(LiteXMLElement.charRange startTag,
                               LiteXMLElement.charRange body,
                               LiteXMLElement.charRange endTag)
Method Detail

equals

public boolean equals(Object aRange)


compareTo

public int compareTo(Object aRange)

Specified by:
compareTo in interface Comparable

toString

public String toString()


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()

JXTA J2SE