|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.textEditor.Interval
public class Interval
Interval of non-negative numbers, start index is included in interval, end index not. Range of this interval is positive.
Constructor Summary | |
---|---|
Interval(int start,
int end)
Contructor. |
Method Summary | |
---|---|
boolean |
contains(int index)
Tests if index falls into interval (into or onto bounds) |
boolean |
contains(Interval interval)
Tests if this interval contains interval. |
int |
getEnd()
Returns ending index. |
int |
getStart()
Returns starting index. |
boolean |
intersects(Interval interval)
Tests if this interval intersects interval. |
static Interval |
ORIntervals(Interval interval1,
Interval interval2)
Computes OR of two intervals. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Interval(int start, int end)
start
- of interval, must be non-negativeend
- of interval, greater than start, is not included in intervalMethod Detail |
---|
public int getStart()
public int getEnd()
public boolean contains(int index)
index
- to test
true
if index is inside of this intervalpublic boolean contains(Interval interval)
interval
- Interval to test
true
if interval
is inside this
intervalpublic boolean intersects(Interval interval)
interval
- Interval to test for inersection
true
if their intersection is not empty or
they are adjacentpublic static Interval ORIntervals(Interval interval1, Interval interval2)
interval1
- interval2
-
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |