|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A dated map whose keys are ordered. A dated sorted map is a dated
map whose iterator returns the mappings in order, where the order is
defined either by the keys' natural ordering or by a Comparator object.
This interface is based on the interface java.util.SortedMap.
It does not extend java.util.SortedMap directly, however,
because at least one date is needed. To make a dated sorted map appear
like a non-dated sorted map, use Adapters.asSortedMap(DatedSortedMap,Date).
Similarly, to treat a non-dated map as dated, use
Adapters.asDatedSortedMap(SortedMap,Date,Date).
TreeMapByDate,
TreeMapByKey,
DatedMap,
Adapters.asSortedMap(DatedSortedMap,Date),
Adapters.asDatedSortedMap(SortedMap,Date,Date)| Nested Class Summary |
| Nested classes inherited from class sos.dated.util.DatedMap |
DatedMap.Entry |
| Field Summary |
| Fields inherited from interface sos.dated.util.DatedObject |
MAX_DATE, MIN_DATE |
| Method Summary | |
java.util.Comparator |
comparator()
Returns the comparator used to sorted the keys of this dated map. |
java.lang.Object |
firstKey(java.util.Date date)
Returns the smallest key in this dated map at the specified date. |
DatedSortedMap |
headMap(java.lang.Object toKey)
Returns a view of this dated map of all mappings whose keys precede toKey. |
java.lang.Object |
lastKey(java.util.Date date)
Returns the largest key in this dated map at the specified date. |
DatedSortedMap |
subMap(java.lang.Object fromKey,
java.lang.Object toKey)
Returns a view of this dated map of all mappings whose keys fall between fromKey (inclusive) and toKey (exclusive). |
DatedSortedMap |
tailMap(java.lang.Object fromKey)
Returns a view of this dated map of all mappings whose keys are greater than or equal to toKey. |
| Methods inherited from interface sos.dated.util.DatedMap |
clear, containsKey, containsKeyThroughout, containsValue, containsValueThroughout, entrySet, equals, excludesKeyThroughout, excludesValueThroughout, get, get, hashCode, hasSizeThroughout, isEmpty, isEmptyThroughout, keySet, put, putAll, remove, size, values |
| Methods inherited from interface sos.dated.util.DatedObject |
dateIterator, dateIterator, equals, hashCode, toString |
| Method Detail |
public java.util.Comparator comparator()
public java.lang.Object firstKey(java.util.Date date)
date - date for which to find the smallest key
date
java.lang.NullPointerException - if date is null
java.util.NoSuchElementException - if this dated map is empty at datepublic DatedSortedMap headMap(java.lang.Object toKey)
toKey - upper bound of the keys of the returned map (exclusive)
public java.lang.Object lastKey(java.util.Date date)
date - date for which to find the largest key
date
java.lang.NullPointerException - if date is null
java.util.NoSuchElementException - if this dated map is empty at date
public DatedSortedMap subMap(java.lang.Object fromKey,
java.lang.Object toKey)
fromKey - lower bound of the keys of the returned map (inclusive)toKey - upper bound of the keys of the returned map (exclusive)
public DatedSortedMap tailMap(java.lang.Object fromKey)
fromKey - lower bound of the keys of the returned map (inclusive)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||