|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A dated set whose elements are ordered. A dated sorted set is a dated
set whose iterator returns the elements in order, where the order is
defined either by the elements' natural ordering or by a Comparator object.
This interface is based on the interface java.util.SortedSet.
It does not extend java.util.SortedSet directly, however,
because at least one date is needed. To make a dated sorted set appear
like a non-dated sorted set, use Adapters.asSortedSet(DatedSortedSet,Date).
Similarly, to treat a non-dated set as dated, use
Adapters.asDatedSortedSet(SortedSet,Date,Date).
TreeSetByDate,
TreeSetByElement,
DatedSet,
Adapters.asSortedSet(DatedSortedSet,Date),
Adapters.asDatedSortedSet(SortedSet,Date,Date)| 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 elements of this dated set. |
java.lang.Object |
first(java.util.Date date)
Returns the smallest element in this dated set at the specified date. |
DatedSortedSet |
headSet(java.lang.Object toElement)
Returns a view of this dated set of all elements that precede toElement. |
java.lang.Object |
last(java.util.Date date)
Returns the largest element in this dated set at the specified date. |
DatedSortedSet |
subSet(java.lang.Object fromElement,
java.lang.Object toElement)
Returns a view of this dated set of all elements that fall between fromElement (inclusive) and toElement (exclusive). |
DatedSortedSet |
tailSet(java.lang.Object fromElement)
Returns a view of this dated set of all elements greater than or equal to toElement. |
| Methods inherited from interface sos.dated.util.DatedSet |
equals, hashCode |
| Methods inherited from interface sos.dated.util.DatedCollection |
add, addAll, clear, contains, containsAll, containsThroughout, excludesThroughout, hasSizeThroughout, isEmpty, isEmptyThroughout, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Methods inherited from interface sos.dated.util.DatedObject |
dateIterator, dateIterator, equals, hashCode, toString |
| Method Detail |
public java.util.Comparator comparator()
public java.lang.Object first(java.util.Date date)
date - date for which to find the smallest element
date
java.lang.NullPointerException - if date is null
java.util.NoSuchElementException - if this dated set is empty at datepublic DatedSortedSet headSet(java.lang.Object toElement)
toElement - upper bound of the elements of the returned set (exclusive)
public java.lang.Object last(java.util.Date date)
date - date for which to find the largest element
date
java.lang.NullPointerException - if date is null
java.util.NoSuchElementException - if this dated map is empty at date
public DatedSortedSet subSet(java.lang.Object fromElement,
java.lang.Object toElement)
fromElement - lower bound of the elements of the returned set (inclusive)toElement - upper bound of the elements of the returned set (exclusive)
public DatedSortedSet tailSet(java.lang.Object fromElement)
fromElement - lower bound of the elements of the returned set (inclusive)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||