|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.javamail.store.nntp.newsrc.Range
public class Range
Represent a single Range in a newsrc file. A Range can be either a single number (start == end) or a span of article numbers.
| Constructor Summary | |
|---|---|
Range(int spot)
Construct a Range item for a single digit range. |
|
Range(int start,
int end)
Construct a Range item. |
|
| Method Summary | |
|---|---|
boolean |
abutts(int article)
Tests if a single point abutts either the start or end of this Range. |
boolean |
abutts(Range other)
Test if two ranges exactly abutt each other. |
boolean |
contains(int target)
Test if a range contains a point value. |
boolean |
contains(Range other)
Test if one range is completely contained within another Range. |
int |
getEnd()
Get the ending point for the Range. |
int |
getStart()
Get the starting point for the Range. |
boolean |
greaterThan(int article)
Test if a point is above the test Range. |
boolean |
greaterThan(Range other)
Test if another Range is greater than this Range. |
boolean |
lessThan(int article)
Test if a point is below the test Range. |
boolean |
lessThan(Range other)
Test if another Range is less than this Range. |
void |
merge(Range other)
Merge another Range into this one. |
boolean |
overlaps(Range other)
Tests if two ranges overlap |
static Range |
parse(String range)
Parse a section of a .newsrc range string into a single Range item. |
void |
save(Writer out)
Save an individual range element to a newsrc file. |
void |
setEnd(int end)
Set the ending point for a Range. |
void |
setStart(int start)
Set the starting point for a Range. |
Range |
split(int location)
Split a range at a given split point. |
String |
toString()
Convert a Range into String form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Range(int spot)
spot - The location of the singleton.
public Range(int start,
int end)
start - The starting point of the Range.end - The Range end point (which may be equal to the starting
point).| Method Detail |
|---|
public static Range parse(String range)
range - The range string.
public int getStart()
public void setStart(int start)
start - The new start value.public int getEnd()
public void setEnd(int end)
end - The new end value.public boolean contains(int target)
target - The article location to test.
public boolean contains(Range other)
other - The other test range.
public boolean overlaps(Range other)
other - The other test range.
public boolean abutts(Range other)
other - The other Range to test.
public boolean abutts(int article)
article - The point to test.
public boolean lessThan(int article)
article - The point to test.
public boolean lessThan(Range other)
other - The other Range to test.
public boolean greaterThan(int article)
article - The point to test.
public boolean greaterThan(Range other)
other - The other Range to test.
public void merge(Range other)
other - The Range to merge.public Range split(int location)
location - The split location. Location must be in the range start <
location < end.
public void save(Writer out)
throws IOException
out - The output writer used to save the data.
IOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||