|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.time.TimeMap
public final class TimeMap
This class maps ITimeFrame
s to Object
s. Since values are stored
using ITimeFrameSource
implementing objects, the value returned by the source may
vary over time. For example, one implementation of ITimeFrameSource
might return
the start and end time of lunch on any given day.
To associate an object with a dynamic TimeFrame
(via ITimeFrameSource
),
call put(ITimeFrameSource, Object)
. You can later retrieve the first object for a
point in time with get(Time)
. The get
method is provided for
convenience and is equivalent to get(Time.now())
.
This class is not thread-safe.
Constructor Summary | |
---|---|
TimeMap()
|
Method Summary | |
---|---|
java.lang.Object |
get()
Retrieves an Object for the current Time value. |
java.lang.Object |
get(Time time)
Retrieves an Object for the given Time value. |
void |
put(ITimeFrameSource source,
java.lang.Object o)
Associates an Object with a dynamic TimeFrame . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeMap()
Method Detail |
---|
public java.lang.Object get()
Object
for the current Time
value.
Object
for the current Time
valuepublic java.lang.Object get(Time time)
Object
for the given Time
value.
time
- the Time
value
Object
for the given Time
value or
null
if none existspublic void put(ITimeFrameSource source, java.lang.Object o)
Object
with a dynamic TimeFrame
.
source
- a source that can produce a TimeFrame
with which to compare a
Time
valueo
- the Object
to be returned for the given dynamic
TimeFrame
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |