|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jtemporal.spi.TemporalAttributeStorageProxy
public abstract class TemporalAttributeStorageProxy
A skeletont for building a proxy.
Delegates all the calls to a given instance of
TemporalAttributeStorage. You can interecept any delegate call
by overriding the method.
It has been marked as abstract, even there is nothing abstract inside,
since it does not make sense to use it without subclassing it.
| Constructor Summary | |
|---|---|
TemporalAttributeStorageProxy(TemporalAttributeStorage storage)
Creates a new instance on top of an exisitng storage. |
|
| Method Summary | |
|---|---|
void |
beginAtomicOperation()
Tells the storage that the JTemporal client is calling a method that can result in multiples updates in the storage. |
void |
clear()
Removes all the stored mappings. |
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more Periods to the specified value. |
boolean |
containsValue(java.lang.Object value,
Period range)
Returns true if this map maps one or more Periods to the specified value, during the specified period. |
void |
endAtomicOperation()
Tells the storage that an atomic operation has finished. |
CloseableIterator |
entryIterator()
Iterates over all the entries of the storage. |
CloseableIterator |
entryIterator(Period p)
Iterates over all the entries of the storage that intersects the period P. |
Period |
firstPeriod()
Returns the first (lowest) period currently in this storage. |
Period |
firstPeriod(Period p)
Returns the first (lowest) period currently in this storage, that intersects the given period. |
TimedObject |
getEntry(Instant instant)
Returns the entry valid at the given instant, if any is found. |
TimedObject |
getEntryEndingAt(Instant instant)
Returns the entry finishing exactly at the given instant, if any is found. |
TimedObject |
getEntryStartingAt(Instant instant)
Returns the entry starting exactly at the given instant, if any is found. |
Period |
getPeriod(Instant instant)
Returns the period that encloses the given instant, if any is found. |
java.lang.Object |
getValue(Instant instant)
Returns the value to which this map maps the specified Instant. |
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. |
Period |
lastPeriod(Period p)
Returns the last (highest) period currently in this storage, that intersects the given period. |
CloseableIterator |
periodIterator()
Iterates over all the periods of the storage. |
CloseableIterator |
periodIterator(Period p)
Iterates over all the periods of the storage that intersects the period P. |
void |
put(Period p,
java.lang.Object value)
Stores a mapping (entry, tuple, row) composed by period and value. |
void |
removeEntry(Period p)
Removes an entry composed by period and value previously stored. |
int |
removeRange(Period range)
Removes all the entries whose period indersects the given period. |
int |
size()
Returns the number of Period-value mappings in this map. |
int |
size(Period p)
Returns the number of Period-value mappings in this map, for the given priod. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemporalAttributeStorageProxy(TemporalAttributeStorage storage)
storage - the storage whose updates are interesting you.| Method Detail |
|---|
public Period lastPeriod()
TemporalAttributeStorage
lastPeriod in interface TemporalAttributeStoragepublic Period lastPeriod(Period p)
TemporalAttributeStorage
lastPeriod in interface TemporalAttributeStoragep - the intersecting period
public Period firstPeriod()
TemporalAttributeStorage
firstPeriod in interface TemporalAttributeStoragepublic Period firstPeriod(Period p)
TemporalAttributeStorage
firstPeriod in interface TemporalAttributeStoragep - the intersecting period
public boolean isEmpty()
TemporalAttributeStorage
isEmpty in interface TemporalAttributeStoragepublic boolean isEmpty(Period p)
TemporalAttributeStorage
isEmpty in interface TemporalAttributeStoragep - the intersecting period
public boolean containsValue(java.lang.Object value)
TemporalAttributeStorage
containsValue in interface TemporalAttributeStoragevalue - value whose presence in this map is to be tested.
public boolean containsValue(java.lang.Object value,
Period range)
TemporalAttributeStorage
containsValue in interface TemporalAttributeStoragevalue - value whose presence in this map is to be tested.range - the period intersecting the value mappings
public java.lang.Object getValue(Instant instant)
TemporalAttributeStorage
getValue in interface TemporalAttributeStorageinstant - instant whose associated value is to be returned
public Period getPeriod(Instant instant)
TemporalAttributeStorage
getPeriod in interface TemporalAttributeStorageinstant - instant whose associated value is to be returned
public TimedObject getEntry(Instant instant)
TemporalAttributeStorage
getEntry in interface TemporalAttributeStorageinstant - instant whose associated value is to be returned
public TimedObject getEntryEndingAt(Instant instant)
TemporalAttributeStorage
getEntryEndingAt in interface TemporalAttributeStorageinstant - the instant the equals the entry end
public TimedObject getEntryStartingAt(Instant instant)
TemporalAttributeStorage
getEntryStartingAt in interface TemporalAttributeStorageinstant - the instant the equals the entry end
public void clear()
TemporalAttributeStorage
clear in interface TemporalAttributeStoragepublic int size()
TemporalAttributeStorage
size in interface TemporalAttributeStoragepublic int size(Period p)
TemporalAttributeStorage
size in interface TemporalAttributeStoragep - the intersecting period
public void beginAtomicOperation()
TemporalAttributeStorage
beginAtomicOperation in interface TemporalAttributeStorageTemporalAttributeStorage.endAtomicOperation()public void endAtomicOperation()
TemporalAttributeStorage
endAtomicOperation in interface TemporalAttributeStorageTemporalAttributeStorage.beginAtomicOperation()
public void put(Period p,
java.lang.Object value)
TemporalAttributeStorage
put in interface TemporalAttributeStoragep - period with which the specified value is associated. Cannot be null.value - value to be associated with the specified key. Cannot be null.public void removeEntry(Period p)
TemporalAttributeStorage
removeEntry in interface TemporalAttributeStoragep - period whose mapping is to be removed from the storage. It
must exactly match the key of an existing entry.public int removeRange(Period range)
TemporalAttributeStorage
removeRange in interface TemporalAttributeStoragerange - the period specifying that range whose interecting entries are
to be deleted.
public CloseableIterator entryIterator()
TemporalAttributeStorage
entryIterator in interface TemporalAttributeStorageTimedObjectpublic CloseableIterator entryIterator(Period p)
TemporalAttributeStorage
entryIterator in interface TemporalAttributeStoragep - the intersecting period.
TimedObjectpublic CloseableIterator periodIterator()
TemporalAttributeStorage
periodIterator in interface TemporalAttributeStoragePeriodpublic CloseableIterator periodIterator(Period p)
TemporalAttributeStorage
periodIterator in interface TemporalAttributeStoragep - the intersecting period.
Period
|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||