|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.accounting.common.TimeRange
public class TimeRange
| Constructor Summary | |
|---|---|
TimeRange(Calendar from,
Calendar to)
The constructor guarantees that 'from' is always before 'to'. |
|
| Method Summary | |
|---|---|
void |
constrainTo(TimeRange otherRange)
Force this time range to be within the given time range |
boolean |
endsWithin(TimeRange other)
Check whether this time range ends within the given time range |
long |
getElapsed()
The range extension, in milliseconds |
Calendar |
getFrom()
Getter for 'from' |
Calendar |
getTo()
Getter for 'to' |
boolean |
isAfter(TimeRange range)
Whether this range starts before 'range' ends |
boolean |
isBefore(TimeRange range)
Whether this range ends before 'range' starts |
boolean |
isClosed()
Check if from and to are set |
boolean |
isOutside(TimeRange otherRange)
Check whether this time range enrirely falls outside the the given time range |
boolean |
isUndefined()
|
boolean |
isWithin(TimeRange range)
Whether this range is entirely within 'range' |
boolean |
startsWithin(TimeRange other)
Check whether this time range starts within the given time range |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeRange(Calendar from,
Calendar to)
from - to - | Method Detail |
|---|
public Calendar getFrom()
public Calendar getTo()
public boolean isClosed()
public boolean isUndefined()
public boolean endsWithin(TimeRange other)
other -
public boolean startsWithin(TimeRange other)
other -
public boolean isOutside(TimeRange otherRange)
other -
public void constrainTo(TimeRange otherRange)
from - to - public boolean isWithin(TimeRange range)
range -
public boolean isBefore(TimeRange range)
range -
public boolean isAfter(TimeRange range)
range -
public long getElapsed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||