|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umd.cfar.lamp.viper.util.AbstractInterval
An abstract base class for interval pairs of Comparable objects, such as BigIntegers or Instants.
Constructor Summary | |
AbstractInterval()
|
Method Summary | |
Interval |
change(java.lang.Comparable start,
java.lang.Comparable stop)
Not implemented; throws unsupported operation exception. |
boolean |
contains(java.lang.Comparable i)
Tests to see if the given item is within the interval. |
boolean |
contains(Interval other)
Tests to see if the other interval is a subset of this interval. |
boolean |
contains(java.lang.Object o)
Tests to see if the given object is contained within the interval. |
boolean |
contains(java.util.Set s)
Tests to see that all elements of the set are contained within this interval. |
boolean |
equals(java.lang.Object o)
Tests to see if this refers to the same interval as the other. |
int |
hashCode()
Gets a hash code. |
boolean |
intersects(Interval other)
Tests to see if this interval intersects the other one. |
boolean |
intersects(java.util.Set s)
Assuming s contains instants or spans of the same type (Time or Frame), this will work. |
boolean |
isEmpty()
Tests to see if any time is taken in the Span. |
java.lang.String |
toString()
Gets a string version of the interval |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.umd.cfar.lamp.viper.util.Interval |
getEnd, getStart |
Constructor Detail |
public AbstractInterval()
Method Detail |
public java.lang.String toString()
[start, end)
public boolean equals(java.lang.Object o)
o
- the interval to test against
public int hashCode()
getStart().hashCode() ^ getEnd().hashCode()
public boolean isEmpty()
isEmpty
in interface Interval
true
if at least one Comparable is takenpublic boolean intersects(java.util.Set s)
intersects
in interface Interval
s
- set of Spans or Instants
public boolean intersects(Interval other)
intersects
in interface Interval
other
- the other interval to test
true
if there exists some
object such that it is contained within this and the other
interval.public boolean contains(java.lang.Object o)
contains()
.
o
- the object to test
public boolean contains(java.lang.Comparable i)
contains
in interface Interval
i
- the comparable object to look for
public boolean contains(Interval other)
contains
in interface Interval
other
- the interval to test
public boolean contains(java.util.Set s)
contains
in interface Interval
s
- the items to check for
public Interval change(java.lang.Comparable start, java.lang.Comparable stop)
change
in interface Interval
start
- the start (inclusive)stop
- the end (exclusive)
java.lang.UnsupportedOperationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |