|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PeriodStorage
A storage for periods (sorted).
This is used by some other storages, such as TemporalSet
| Method Summary | |
|---|---|
void |
clear()
Removes all the stored periods. |
Period |
firstPeriod()
Returns the first (lowest) period currently in this storage, or null if any is found. |
Period |
getPeriod(Instant instant)
Returns the period valid at the specified instant. |
Period |
getPeriodEndingAt(Instant instant)
Returns the period finishing exactly at the given instant, if any is found. |
Period |
getPeriodStartingAt(Instant instant)
Returns the period starting exactly at the given instant, if any is found. |
boolean |
isEmpty()
Returns true if this storage does not contain objects. |
boolean |
isEmpty(Period p)
Returns true if this storage does not contain objects intersecting the given period. |
Period |
lastPeriod()
Returns the last (highest) period currently in this storage or null if empty. |
CloseableIterator |
periodIterator()
Iterates over all the periods of the entries. |
CloseableIterator |
periodIterator(Period period)
Iterates over all the periods of the storage that intersects the given period. |
void |
put(Period p)
Stores a period. |
void |
remove(Period p)
Removes a period previously stored. |
int |
size()
Returns the number of Periods in this storage. |
| Method Detail |
|---|
Period lastPeriod()
Period firstPeriod()
boolean isEmpty()
boolean isEmpty(Period p)
p - the intersecting period
Period getPeriod(Instant instant)
instant - the instant whose enclosing period must be returned
Period getPeriodEndingAt(Instant instant)
instant - the instant the equals the entry end
Period getPeriodStartingAt(Instant instant)
instant - the instant the equals the entry end
void clear()
java.lang.RuntimeException - (or any other subclass) if the operation could not be performed.int size()
void put(Period p)
p - period to be added to the storage. Cannot be null.
java.lang.IllegalArgumentException - if some aspect of this period
prevents it from being stored.void remove(Period p)
p - the period to be removed
java.util.NoSuchElementException - if the entry is not found
java.lang.IllegalArgumentException - if p is nullCloseableIterator periodIterator(Period period)
period - the intersecting period.
PeriodCloseableIterator periodIterator()
Period
|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||