|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.document.LiteXMLElement.charRange
protected static class LiteXMLElement.charRange
Defines a range of characters, probably within a string. The range is deemed to be invalid if 'start' is -1. A zero length range is, by convention, described by an 'end' value of 'start' - 1.
Field Summary | |
---|---|
int |
end
Contains the end position of this range. one weird thing: if end == start -1, then the item is of zero length begining at start. |
int |
start
Contains the start position of this range. |
Constructor Summary | |
---|---|
LiteXMLElement.charRange()
Constructor for a null charRange. |
|
LiteXMLElement.charRange(int start,
int end)
Constructor for which the bounds are specified. |
Method Summary | |
---|---|
int |
compareTo(Object aRange)
|
boolean |
contains(int someLoc)
Returns true if the location specified is contained in this range. |
boolean |
contains(LiteXMLElement.charRange someRange)
Returns true if the charRange specified by someRange is
contained within this range. |
boolean |
contains(LiteXMLElement.tagRange someRange)
Returns true if the tagRange specified by someRange is
contained within this range. |
boolean |
equals(Object aRange)
|
boolean |
isValid()
Returns true if the range is both non-null and has a length of greater than or equal to zero. |
int |
length()
Returns the length of this range. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int start
public int end
Constructor Detail |
---|
public LiteXMLElement.charRange()
public LiteXMLElement.charRange(int start, int end)
Method Detail |
---|
public boolean equals(Object aRange)
equals
in class Object
public int compareTo(Object aRange)
compareTo
in interface Comparable
public String toString()
toString
in class Object
public boolean contains(LiteXMLElement.charRange someRange)
charRange
specified by someRange is
contained within this range.
someRange
- The range which must be contained within this range.
public boolean contains(LiteXMLElement.tagRange someRange)
tagRange
specified by someRange is
contained within this range.
someRange
- The range which must be contained within this range.
public boolean contains(int someLoc)
someLoc
- the location which is to be tested.
public boolean isValid()
public int length()
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |