Package org.apache.wicket.util.time
Class TimeMap
- java.lang.Object
-
- org.apache.wicket.util.time.TimeMap
-
- All Implemented Interfaces:
Serializable
@Deprecated public final class TimeMap extends Object implements Serializable
Deprecated.Since Wicket 9 this class is obsolete and no more used. It will be removed in Wicket 10This class mapsITimeFrame
s toObject
s. Since values are stored usingITimeFrameSource
implementing objects, the value returned by the source may vary over time. For example, one implementation ofITimeFrameSource
might return the start and end time of lunch on any given day.To associate an object with a dynamic
TimeFrame
(viaITimeFrameSource
), callput(ITimeFrameSource, Object)
. You can later retrieve the first object for a point in time withget(Time)
. Theget
method is provided for convenience and is equivalent toget(Time.now())
.This class is not thread-safe.
- Since:
- 1.2.6
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimeMap()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
get()
Deprecated.Retrieves anObject
for the currentTime
value.Object
get(Time time)
Deprecated.Retrieves anObject
for the givenTime
value.void
put(ITimeFrameSource source, Object o)
Deprecated.Associates anObject
with a dynamicTimeFrame
.
-
-
-
Constructor Detail
-
TimeMap
public TimeMap()
Deprecated.
-
-
Method Detail
-
get
public Object get()
Deprecated.Retrieves anObject
for the currentTime
value.- Returns:
Object
for the currentTime
value
-
get
public Object get(Time time)
Deprecated.Retrieves anObject
for the givenTime
value.- Parameters:
time
- theTime
value- Returns:
- gets an
Object
for the givenTime
value ornull
if none exists
-
put
public void put(ITimeFrameSource source, Object o)
Deprecated.Associates anObject
with a dynamicTimeFrame
.- Parameters:
source
- a source that can produce aTimeFrame
with which to compare aTime
valueo
- theObject
to be returned for the given dynamicTimeFrame
-
-