wicket.util.time
Class TimeMap
java.lang.Object
wicket.util.time.TimeMap
public final class TimeMap
- extends java.lang.Object
This class maps ITimeFrames to Objects. 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 method get() is provided for convenience
and is equivalent to get(Time.now()).
This class is not threadsafe.
- Author:
- Jonathan Locke
Method Summary |
java.lang.Object |
get()
|
java.lang.Object |
get(Time time)
|
void |
put(ITimeFrameSource source,
java.lang.Object o)
Associates an object with a dynamic time frame |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeMap
public TimeMap()
get
public java.lang.Object get()
- Returns:
- Object for the current time
get
public java.lang.Object get(Time time)
- Parameters:
time
- The time
- Returns:
- Gets an Object for the given time value or null if none exists
put
public void put(ITimeFrameSource source,
java.lang.Object o)
- Associates an object with a dynamic time frame
- Parameters:
source
- A source that can produce a timeframe to compare a time value
witho
- The object to be returned for the given dynamic timeframe
Copyright © 2004-2007 Wicket developers. All Rights Reserved.