|
Side of Software Dated Collections Library 2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
E - the type of value maintained by this dated valueD - the type of dates used by this dated valuepublic interface DatedValue<E,D>
A value over time. The DatedValue interface defines
a reference that has a value dependent on time.
Primitive values must be wrapped in their appropriate wrapper.
ValueByDate| Method Summary | |
|---|---|
boolean |
equals(D at,
DatedObject<D> obj,
D objAt)
Indicates if this dated object at at is equal to
obj at objAt. |
E |
get(D at)
Returns the value at a specified date. |
int |
hashCode(D at)
Returns a hash code value of this dated object at the specified date. |
boolean |
is(java.lang.Object value,
D at)
Returns true if this dated value has the specified value at
the specified date. |
boolean |
isNotThroughout(java.lang.Object value,
D from,
D to)
Returns true if this dated value does not have the specified value
at any date within the specified date range. |
boolean |
isThroughout(java.lang.Object value,
D from,
D to)
Returns true if this dated value has the specified value throughout
the specified date range. |
DatedValue<E,D> |
set(E value,
D from,
D to)
Sets the value for a specified date range (optional operation). |
| Methods inherited from interface sos.dated.util.DatedObject |
|---|
dateIterator, dateIterator, equals, hashCode, toString |
| Method Detail |
|---|
boolean equals(D at,
DatedObject<D> obj,
D objAt)
DatedObjectat is equal to
obj at objAt.
equals in interface DatedObject<D>at - date at which this object should be testedobj - the other dated object to be compared toobjAt - the date of the other dated object
true if this dated object at at equals
another dated object at objAtE get(D at)
null
if no value has been set for that date. Thus, it is impossible to
distinguish an unset value and a set value of null. If
such a distinction is necessary, the client can use a special marker
value instead of null to signal a null value.
at - date at which this dated value is to be queried
java.lang.NullPointerException - if at is nullint hashCode(D at)
DatedObjecto1 and o2 and two dates
d1 and d2, if
o1.equals( d1, o2, d2 ) returns true,
then o1.hashCode( d1 )
must equal o2.hashCode( d2 ).
hashCode in interface DatedObject<D>at - date to which the hash code value should correspond
boolean is(java.lang.Object value,
D at)
true if this dated value has the specified value at
the specified date. If value is null and this dated value has not been
set at the specified date, this method returns true.
value - value whose presence is to be testedat - date at which this dated value is to be queried
true if this dated value has a specified value at
a specified date
java.lang.NullPointerException - if at is null
boolean isNotThroughout(java.lang.Object value,
D from,
D to)
true if this dated value does not have the specified value
at any date within the specified date range.
value - value whose presence is to be testedfrom - starting date (inclusive) at which containment should be testedto - ending date (exclusive) at which containment should be tested
true if this dated value does not have the specified value
at any date within the specified date range
java.lang.IllegalArgumentException - if from does not precede to
java.lang.NullPointerException - if from or to is null
boolean isThroughout(java.lang.Object value,
D from,
D to)
true if this dated value has the specified value throughout
the specified date range.
value - value whose presence is to be testedfrom - starting date (inclusive) at which containment should be testedto - ending date (exclusive) at which containment should be tested
true if this dated value has a specified value throughout
the specified date range
java.lang.IllegalArgumentException - if from does not precede to
java.lang.NullPointerException - if from or to is null
DatedValue<E,D> set(E value,
D from,
D to)
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.
value - 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.
java.lang.IllegalArgumentException - to is not greater than from
java.lang.NullPointerException - if from or to is null
java.lang.UnsupportedOperationException - if this dated value does not
support set
|
Side of Software Dated Collections Library 2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||