|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--sos.dated.util.AbstractDatedObject
|
+--sos.dated.util.AbstractDatedValue
|
+--sos.dated.util.ValueByDate
An implementation of DatedValue that can efficiently produce the value
at a given date.
This implementation is serializable and cloneable; however, it is not
synchronized. To use it safely in a multi-threaded situation, wrap an
instance of the dated object with a call to DatedCollections.synchronizedDatedValue.
DatedValue,
DatedCollections.synchronizedDatedValue(sos.dated.util.DatedValue)| Field Summary |
| Fields inherited from interface sos.dated.util.DatedObject |
MAX_DATE, MIN_DATE |
| Constructor Summary | |
ValueByDate()
Creates a ValueByDate with a null value over all dates. |
|
ValueByDate(DatedValue datedValue)
Creates a ValueByDate with the same values as the specified dated
value. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
DateIterator |
dateIterator(java.util.Date date)
Returns an iterator of the dates of when this dated type has changed. |
java.lang.Object |
get(java.util.Date date)
Returns the value at a specified date. |
DatedValue |
set(java.lang.Object value,
java.util.Date from,
java.util.Date to)
Sets the value for a specified date range (optional operation). |
| Methods inherited from class sos.dated.util.AbstractDatedValue |
equals, hashCode, is, isNotThroughout, isThroughout, toString |
| Methods inherited from class sos.dated.util.AbstractDatedObject |
dateIterator, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface sos.dated.util.DatedValue |
equals, hashCode, is, isNotThroughout, isThroughout |
| Methods inherited from interface sos.dated.util.DatedObject |
dateIterator, equals, hashCode, toString |
| Constructor Detail |
public ValueByDate()
ValueByDate with a null value over all dates.
public ValueByDate(DatedValue datedValue)
ValueByDate with the same values as the specified dated
value.
datedValue - values used to initialized this object
java.lang.NullPointerException - if datedValue is null| Method Detail |
public java.lang.Object clone()
clone in class java.lang.Objectpublic DateIterator dateIterator(java.util.Date date)
dateIterator in interface DatedObjectdateIterator in class AbstractDatedObjectdate - date to position the iteration
public java.lang.Object get(java.util.Date date)
get in interface DatedValuedate - date at which this dated value is to be queried
java.lang.NullPointerException - if date is null
public DatedValue set(java.lang.Object value,
java.util.Date from,
java.util.Date to)
DatedValue
The returned value holds the old values before the call to set
and is applicable only for the specified date range.
It may be read-only, and it is not tied to this dated value.
set in interface DatedValueset in class AbstractDatedValuevalue - value to be setfrom - starting date (inclusive) at which the value should holdto - ending date (exclusive) at which the value should hold
DatedValue indicating the
values held in the date range of interest before
the call to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||