|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.Span
public class Span
Class representing a range of integer values. The range includes all values in the interval [start, end]. Values may be negative, but the value of start must be less than or equal to the value of end.
Field Summary | |
---|---|
static java.lang.String |
END_KEY
|
static java.lang.String |
START_KEY
|
Constructor Summary | |
---|---|
Span()
|
|
Span(Dictionary<java.lang.String,?> span)
|
|
Span(int start,
int end)
|
|
Span(Span span)
|
Method Summary | |
---|---|
boolean |
contains(Span span)
Determines whether this span contains another span. |
Span |
createIntersection(Span span)
Determines the intersection of this span and another span. |
Span |
createUnion(Span span)
Determines the union of this span and another span. |
boolean |
equals(java.lang.Object o)
|
int |
getEnd()
Returns the last value in the span. |
long |
getLength()
Returns the length of the span. |
int |
getStart()
Returns the first value in the span. |
boolean |
intersects(Span span)
Determines whether this span intersects with another span. |
void |
setEnd(int end)
Sets the last value in the span. |
void |
setRange(int start,
int end)
Sets the range of the span. |
void |
setStart(int start)
Sets the first value in the span. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String START_KEY
public static final java.lang.String END_KEY
Constructor Detail |
---|
public Span()
public Span(Dictionary<java.lang.String,?> span)
public Span(Span span)
public Span(int start, int end)
Method Detail |
---|
public int getStart()
public void setStart(int start)
start
- The first value in the span. Must be less than or equal to
the end value.public int getEnd()
public void setEnd(int end)
end
- The last value in the span. Must be greater than or equal to
the start value.public long getLength()
public void setRange(int start, int end)
start
- The first value in the span. Must be less than or equal to
end.end
- The last value in the span. Must be greater than or equal to
start.public boolean contains(Span span)
span
- The span to test for containment.
public boolean intersects(Span span)
span
- The span to test for intersection.
public Span createIntersection(Span span)
span
- The span to intersect with this span.
public Span createUnion(Span span)
span
- The span to union with this span.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |