|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.sandesha2.util.RangeString
public class RangeString
Helper class. Enables conversion to from a list of Range objects to a String representation of that list. Also performs task such as aggregation of ranges
Constructor Summary | |
---|---|
RangeString()
Creates an empty range string |
|
RangeString(RangeString rs)
|
|
RangeString(java.lang.String s)
Expects a String of the form [x1,y1][x2,y2]... |
Method Summary | |
---|---|
RangeString |
addRange(Range r)
Adds the Range into the existing RangeString Any existing Ranges that are encompassed in this new Range are removed. |
static RangeString |
clone(RangeString original)
|
boolean |
equals(java.lang.Object o)
|
java.util.List<java.lang.Long> |
getContainedElementsAsNumbersList()
Returns a List of the form [x1,x2,x3....xn] listing each discrete number contained in all of the ranges in order NOTE: inefficient, should be avoided |
Range |
getRangeForMessageNumber(long messageNumber)
|
Range[] |
getRanges()
|
boolean |
isMessageNumberInRanges(long messageNumber)
|
boolean |
isRangeCompleted(Range interestedRange)
Returns true if the numbers are contained in a single range |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RangeString()
public RangeString(java.lang.String s)
s
- public RangeString(RangeString rs)
Method Detail |
---|
public boolean isMessageNumberInRanges(long messageNumber)
public Range getRangeForMessageNumber(long messageNumber)
public boolean isRangeCompleted(Range interestedRange)
interestedRange
-
public java.lang.String toString()
toString
in class java.lang.Object
public Range[] getRanges()
public java.util.List<java.lang.Long> getContainedElementsAsNumbersList()
public static RangeString clone(RangeString original)
public RangeString addRange(Range r)
r
-
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |