|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--sos.dated.util.DatedCollections
Views and algorithms that act on dated collections. This class
is the equivalent to java.util.Collections that works on dated collections.
Specifically, it provides synchronized equivalents of the collections with the methods
synchronizedDatedList(DatedList)
synchronizedDatedMap(DatedMap)
synchronizedDatedSet(DatedSet)
synchronizedDatedSortedSet(DatedSortedSet)
synchronizedDatedSortedMap(DatedSortedMap)
synchronizedDatedValue(DatedValue)
unmodifiableDatedList(DatedList)
unmodifiableDatedMap(DatedMap)
unmodifiableDatedSet(DatedSet)
unmodifiableDatedSortedSet(DatedSortedSet)
unmodifiableDatedSortedMap(DatedSortedMap)
unmodifiableDatedValue(DatedValue)
DatedCollection,
DatedSet,
DatedList,
DatedMap,
Adapters| Nested Class Summary | |
static interface |
DatedCollections.Action
Action to perform on a dated object at a period when it does not change. |
| Field Summary | |
static Dates |
ALL_DATES
An immutable series of dates with the range [MIN_DATE,MAX_DATE). |
static DatedList |
EMPTY_DATED_LIST
An empty and immutable dated list. |
static DatedMap |
EMPTY_DATED_MAP
An empty and immutable dated map. |
static DatedSet |
EMPTY_DATED_SET
An empty and immutable dated set. |
static Dates |
EMPTY_DATES
An empty and immutable series of dates. |
static DatedValue |
NULL_DATED_VALUE
An immutable dated value with only null values. |
| Method Summary | |
static void |
applyAtDates(DatedObject datedObject,
java.util.Date from,
java.util.Date to,
DatedCollections.Action action)
Performs the specified destructive action on the specified dated object withing the specified date range. |
static int |
binarySearch(DatedList datedList,
java.lang.Object key,
java.util.Comparator comparator,
java.util.Date date)
Searches for the specified key in the specified ordered list at the specified date, using the specified comparator, and returning the index of the key or the index of where the key would be inserted times negative one minus one. |
static int |
binarySearch(DatedList datedList,
java.lang.Object key,
java.util.Date date)
Searches for the specified key in the specified ordered list at the specified date, returning the index of the key or the index of where the key would be inserted times negative one minus one. |
static void |
copy(DatedList datedList,
java.util.List src,
java.util.Date from,
java.util.Date to)
Copies the elements of src into datedList for the specified date range. |
static void |
fill(DatedList datedList,
java.lang.Object obj,
java.util.Date from,
java.util.Date to)
Fills the specified dated list with the specified element for the specified date range. |
static int |
indexOfSubList(DatedList datedList,
java.util.List target,
java.util.Date date)
Returns the index of the first occurrence of target in the specified dated list at the specified date, or -1 if it never occurs. |
static int |
lastIndexOfSubList(DatedList datedList,
java.util.List target,
java.util.Date date)
Returns the index of the last occurrence of target in the specified dated list at the specified date, or -1 if it never occurs. |
static java.lang.Object |
max(DatedCollection datedCollection,
java.util.Comparator comparator,
java.util.Date date)
Returns the maximum value in the specified dated collection at the specified date, according to the specified comparator. |
static java.lang.Object |
max(DatedCollection datedCollection,
java.util.Date date)
Returns the maximum value (according to the natural ordering) in the specified dated collection at the specified date. |
static java.lang.Object |
min(DatedCollection datedCollection,
java.util.Comparator comparator,
java.util.Date date)
Returns the maximum value in the specified dated collection at the specified date, according to the specified comparator. |
static java.lang.Object |
min(DatedCollection datedCollection,
java.util.Date date)
Returns the minimum value (according to the natural ordering) in the specified dated collection at the specified date. |
static DatedList |
nCopies(int n,
java.lang.Object o,
java.util.Date from,
java.util.Date to)
Returns an unmodifiable dated list containing exactly n copies of the specified object during the specified date range. |
static void |
queryAtDates(DatedObject datedObject,
java.util.Date from,
java.util.Date to,
DatedCollections.Action action)
Performs the specified non-destructive action on the specified dated object withing the specified date range. |
static Dates |
replaceAll(DatedList datedList,
java.lang.Object oldVal,
java.lang.Object newVal,
java.util.Date from,
java.util.Date to)
Replaces all occurrences of oldVal with newVal in the specified list throughout the specified date range. |
static void |
reverse(DatedList datedList,
java.util.Date from,
java.util.Date to)
Reverses the elements of the specified dated list in the specified date range. |
static void |
rotate(DatedList datedList,
int distance,
java.util.Date from,
java.util.Date to)
Shifts the elements of the specified dated list in the specified date range the specified distance. |
static void |
shuffle(DatedList datedList,
java.util.Date from,
java.util.Date to)
Randomly rearranges the elements of the specified dated list in the specified date range The routine uses an internal random number generator. |
static void |
shuffle(DatedList datedList,
java.util.Random rnd,
java.util.Date from,
java.util.Date to)
Randomly rearranges the elements of the specified dated list in the specified date range, using the specified random number generator. |
static DatedList |
singletonDatedList(java.lang.Object o,
java.util.Date from,
java.util.Date to)
Returns an unmodifiable dated list containing only the specified object during the specified date range. |
static DatedMap |
singletonDatedMap(java.lang.Object key,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
Returns an unmodifiable dated map containing only the mapping of key to value during the specified date range. |
static DatedSet |
singletonDatedSet(java.lang.Object o,
java.util.Date from,
java.util.Date to)
Returns an unmodifiable dated set containing only the specified object during the specified date range. |
static void |
sort(DatedList datedList,
java.util.Comparator comparator,
java.util.Date from,
java.util.Date to)
Sorts the elements of the specified dated list in the specified date range in ascending order, using the specified comparator. |
static void |
sort(DatedList datedList,
java.util.Date from,
java.util.Date to)
Sorts the elements of the specified dated list in the specified date range in ascending order. |
static void |
swap(DatedList datedList,
int i,
int j,
java.util.Date from,
java.util.Date to)
Exchanges the elements at indices i and j in the specified list at the specified date. |
static DatedCollection |
synchronizedDatedCollection(DatedCollection datedCollection)
Returns a synchronized, or thread-safe, view of a dated collection. |
static DatedList |
synchronizedDatedList(DatedList datedList)
Returns a synchronized, or thread-safe, view of a dated list. |
static DatedMap |
synchronizedDatedMap(DatedMap datedMap)
Returns a synchronized, or thread-safe, view of a dated map. |
static DatedObject |
synchronizedDatedObject(DatedObject datedObject)
Returns a synchronized, or thread-safe, view of a dated object. |
static DatedSet |
synchronizedDatedSet(DatedSet datedSet)
Returns a synchronized, or thread-safe, view of a dated set. |
static DatedSortedMap |
synchronizedDatedSortedMap(DatedSortedMap datedSortedMap)
Returns a synchronized, or thread-safe, view of a dated sorted map. |
static DatedSortedSet |
synchronizedDatedSortedSet(DatedSortedSet datedSortedSet)
Returns a synchronized, or thread-safe, view of a dated sorted set. |
static DatedValue |
synchronizedDatedValue(DatedValue datedValue)
Returns a synchronized, or thread-safe, view of a dated value. |
static Dates |
synchronizedDates(Dates dates)
Returns a synchronized, or thread-safe, view of a series of date ranges. |
static DatedCollection |
unmodifiableDatedCollection(DatedCollection datedCollection)
Returns an unmodifiable view of a dated collection. |
static DatedList |
unmodifiableDatedList(DatedList datedList)
Returns an unmodifiable view of a dated list. |
static DatedMap |
unmodifiableDatedMap(DatedMap datedMap)
Returns an unmodifiable view of a dated map. |
static DatedSet |
unmodifiableDatedSet(DatedSet datedSet)
Returns an unmodifiable view of a dated set. |
static DatedSortedMap |
unmodifiableDatedSortedMap(DatedSortedMap datedSortedMap)
Returns an unmodifiable view of a dated sorted map. |
static DatedSortedSet |
unmodifiableDatedSortedSet(DatedSortedSet datedSortedSet)
Returns an unmodifiable view of a dated sorted set. |
static DatedValue |
unmodifiableDatedValue(DatedValue datedValue)
Returns an unmodifiable view of a dated value. |
static Dates |
unmodifiableDates(Dates dates)
Returns an unmodifiable view of a series of dates. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Dates ALL_DATES
[MIN_DATE,MAX_DATE).
This Dates object is serializable and resolves to this same object when
deserialized.
public static final Dates EMPTY_DATES
Dates object is serializable and resolves to this same object when
deserialized.
public static final DatedList EMPTY_DATED_LIST
public static final DatedSet EMPTY_DATED_SET
public static final DatedMap EMPTY_DATED_MAP
public static final DatedValue NULL_DATED_VALUE
null values.
This dated value is serializable and resolves to this same object when
deserialized.
| Method Detail |
public static void applyAtDates(DatedObject datedObject,
java.util.Date from,
java.util.Date to,
DatedCollections.Action action)
from and to in
datedObject. Then it invokes the
action's perform method for the discovered ranges. A change to the dated
object during perform does not alter the iteration over dates in away.
datedObject - target of actionfrom - start date of range (inclusive) to perform actionto - end date of range (exclusive) to perform actionaction - destructive action to perform on datedObject between
from and to
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if from does not precede toqueryAtDates(sos.dated.util.DatedObject, java.util.Date, java.util.Date, sos.dated.util.DatedCollections.Action)
public static void queryAtDates(DatedObject datedObject,
java.util.Date from,
java.util.Date to,
DatedCollections.Action action)
datedObject - target of actionfrom - start date of range (inclusive) to perform actionto - end date of range (exclusive) to perform actionaction - non-destructive action to perform on datedObject between
from and to
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if from does not precede toapplyAtDates(sos.dated.util.DatedObject, java.util.Date, java.util.Date, sos.dated.util.DatedCollections.Action)public static Dates unmodifiableDates(Dates dates)
In this implementation, the returned Dates object "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned Dates object is serializable only if the parameter is serializable.
dates - dates to treat as read-only
dates
java.lang.NullPointerException - if dates is nullpublic static DatedValue unmodifiableDatedValue(DatedValue datedValue)
In this implementation, the returned value "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated value is serializable only if the parameter is serializable.
datedValue - dated value to treat as read-only
java.lang.NullPointerException - if the specified dated value is nullpublic static DatedCollection unmodifiableDatedCollection(DatedCollection datedCollection)
In this implementation, the returned collection "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated collection is serializable only if the parameter is serializable.
datedCollection - dated collection to treat as read-only
java.lang.NullPointerException - if the specified dated collection is nullpublic static DatedSet unmodifiableDatedSet(DatedSet datedSet)
In this implementation, the returned set "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated set is serializable only if the parameter is serializable.
datedSet - dated set to treat as read-only
java.lang.NullPointerException - if the specified dated set is nullpublic static DatedList unmodifiableDatedList(DatedList datedList)
In this implementation, the returned list "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated list is serializable only if the parameter is serializable.
Also, the returned dated list implements RandomAccess if the parameter implements
RandomAccess.
datedList - dated list to treat as read-only
java.lang.NullPointerException - if the specified dated list is nullpublic static DatedMap unmodifiableDatedMap(DatedMap datedMap)
In this implementation, the returned map "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated map is serializable only if the parameter is serializable.
datedMap - dated map to treat as read-only
java.lang.NullPointerException - if the specified dated map is nullpublic static DatedSortedMap unmodifiableDatedSortedMap(DatedSortedMap datedSortedMap)
In this implementation, the returned sorted map "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated sorted map is serializable only if the parameter is serializable.
datedSortedMap - dated sorted map to treat as read-only
java.lang.NullPointerException - if the specified dated sorted map is nullpublic static DatedSortedSet unmodifiableDatedSortedSet(DatedSortedSet datedSortedSet)
In this implementation, the returned sorted set "wraps"
the specified parameter in that it uses the parameter as its backing store.
All query operations get passed to the backing store, and all update operations
throw an UnsupportedOperationException.
The returned dated sorted set is serializable only if the parameter is serializable.
datedSortedSet - dated sorted set to treat as read-only
java.lang.NullPointerException - if the specified dated sorted set is nullpublic static Dates synchronizedDates(Dates dates)
Dates object synchronizes on itself at each
method invocation and then passes the operation on to the parameter.
Note that this implementation is coarse grained in that it does not allow
concurrent access to disjoint date ranges of the object.
The client must manually synchronize on the returned Dates object
in order to iterate over the ranges safely, as follows:
Dates dates = ...
Dateds syncDates = DatedCollections.synchronizedDates( dates );
synchronized( syncDates ) {
DateIterator dateIter = syncDates.dateIterator();
while( dateIter.hasNext() ) {
...
}
}
The returned dated object is serializable only if the parameter is serializable.
dates - series of date ranges to be thread-safe
dates that multiple threads may safely access
java.lang.NullPointerException - if the specified dated object is nullpublic static DatedObject synchronizedDatedObject(DatedObject datedObject)
The client must manually synchronize on the returned dated object in order to iterate over the dates safely, as follows:
DateObject obj = ...
DatedObject syncObj = DatedCollections.synchronizedDatedObject( obj );
synchronized( syncObj ) {
DateIterator dateIter = syncObj.dateIterator();
while( dateIter.hasNext() ) {
...
}
}
To satisfy the contracts of equals(Date,DatedObject,Date)
and hashCode(int) in subtypes that
strengthen these contracts, the returned dated object does not forward
these calls to the parameter.The returned dated object is serializable only if the parameter is serializable.
datedObject - dated object to be thread-safe
java.lang.NullPointerException - if the specified dated ibject is nullpublic static DatedValue synchronizedDatedValue(DatedValue datedValue)
The returned dated value is serializable only if the parameter is serializable.
datedValue - dated value to be thread-safe
java.lang.NullPointerException - if the specified dated value is nullsynchronizedDatedObject(DatedObject)public static DatedCollection synchronizedDatedCollection(DatedCollection datedCollection)
Date someDate = ...
DatedCollection coll = ...
DatedCollection syncColl = DatedCollections.synchronizedDatedCollection( coll );
synchronized( syncColl ) {
Iterator iter = syncColl.iterator( someDate );
while( iter.hasNext() ) {
Object element = iter.next();
...
}
}
The returned dated collection is serializable only if the parameter is serializable.
datedCollection - dated collection to be thread-safe
java.lang.NullPointerException - if the specified dated collection is nullsynchronizedDatedObject(DatedObject)public static DatedSet synchronizedDatedSet(DatedSet datedSet)
The returned dated set is serializable only if the parameter is serializable.
datedSet - dated set to be thread-safe
java.lang.NullPointerException - if the specified dated set is nullsynchronizedDatedCollection(DatedCollection)public static DatedList synchronizedDatedList(DatedList datedList)
The returned dated set is serializable only if the parameter is serializable.
Also, the returned dated list implements RandomAccess if the parameter
implements RandomAccess.
datedList - dated list to be thread-safe
java.lang.NullPointerException - if the specified dated list is nullsynchronizedDatedCollection(DatedCollection)public static DatedMap synchronizedDatedMap(DatedMap datedMap)
Date someDate = ...
DatedMap map = ...
DatedMap syncMap = DatedCollections.synchronizedDatedMap( map );
DatedSet entrySet = syncMap.entrySet();
synchronized( syncMap ) {
Iterator iter = entrySet.iterator( someDate );
while( iter.hasNext() ) {
DatedMap.Entry entry = (DatedMap.Entry)iter.next();
...
}
}
The returned dated map is serializable only if the parameter is serializable.
datedMap - dated map to be thread-safe
java.lang.NullPointerException - if the specified dated map is nullsynchronizedDatedObject(DatedObject)public static DatedSortedMap synchronizedDatedSortedMap(DatedSortedMap datedSortedMap)
Date someDate = ...
DatedMap map = ...
DatedMap syncMap = DatedCollections.synchronizedDatedMap( map );
DatedMap headMap = syncMap.headMap( someKey );
DatedSet entrySet = headMap.entrySet();
synchronized( syncMap ) {
Iterator iter = entrySet.iterator( someDate );
while( iter.hasNext() ) {
DatedMap.Entry entry = (DatedMap.Entry)iter.next();
...
}
}
The returned dated sorted map is serializable only if the parameter is serializable.
datedSortedMap - dated sorted map to be thread-safe
java.lang.NullPointerException - if the specified dated sorted map is nullsynchronizedDatedMap(DatedMap)public static DatedSortedSet synchronizedDatedSortedSet(DatedSortedSet datedSortedSet)
Date someDate = ...
DatedSet set = ...
DatedSet syncSet = DatedCollections.synchronizedDatedSet( set );
DatedMap tailSet = syncSet.tailSet( someElement );
synchronized( syncSet ) {
Iterator iter = tailSet.iterator( someDate );
while( iter.hasNext() ) {
Object element = iter.next();
...
}
}
The returned dated sorted set is serializable only if the parameter is serializable.
datedSortedSet - dated sorted set to be thread-safe
java.lang.NullPointerException - if the specified dated sorted set is nullsynchronizedDatedCollection(DatedCollection)
public static void sort(DatedList datedList,
java.util.Date from,
java.util.Date to)
datedList - dated list to be sortedfrom - start date of range (inclusive) to sort the listto - end date of range (exclusive) to sort the list
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if from does not precede to
public static void sort(DatedList datedList,
java.util.Comparator comparator,
java.util.Date from,
java.util.Date to)
datedList - dated list to be sortedcomparator - comparator used to determine ascending order (may be null)from - start date of range (inclusive) to sort the listto - end date of range (exclusive) to sort the list
java.lang.NullPointerException - if datedList, from, or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static void shuffle(DatedList datedList,
java.util.Date from,
java.util.Date to)
datedList - dated list to be shuffledfrom - start date of range (inclusive) to shuffle the listto - end date of range (exclusive) to shuffle the list
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if from does not precede to
public static void shuffle(DatedList datedList,
java.util.Random rnd,
java.util.Date from,
java.util.Date to)
datedList - dated list to be sortedrnd - random number generator used to determine the permutationfrom - start date of range (inclusive) to sort the listto - end date of range (exclusive) to sort the list
java.lang.NullPointerException - if datedList, from, or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static void rotate(DatedList datedList,
int distance,
java.util.Date from,
java.util.Date to)
datedList - dated list to be rotateddistance - number of indices to shift the elements of the listfrom - start date of range (inclusive) to rotate the listto - end date of range (exclusive) to rotate the list
java.lang.NullPointerException - if datedList, from, or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static void reverse(DatedList datedList,
java.util.Date from,
java.util.Date to)
datedList - dated list to be reversedfrom - start date of range (inclusive) to reverse the listto - end date of range (exclusive) to reverse the list
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if from does not precede to
public static java.lang.Object max(DatedCollection datedCollection,
java.util.Date date)
datedCollection - dated collection to be searcheddate - date to search the collection
java.lang.NullPointerException - if any argument is nullmax(DatedCollection,Comparator,Date),
min(DatedCollection,Date)
public static java.lang.Object max(DatedCollection datedCollection,
java.util.Comparator comparator,
java.util.Date date)
datedCollection - dated collection to be searchedcomparator - comparator used to order the elements (may be null)date - date to search the collection
java.lang.NullPointerException - if datedCollection or date is nullmax(DatedCollection,Date),
min(DatedCollection,Comparator,Date)
public static java.lang.Object min(DatedCollection datedCollection,
java.util.Date date)
datedCollection - dated collection to be searcheddate - date to search the collection
java.lang.NullPointerException - if any argument is nullmin(DatedCollection,Comparator,Date),
max(DatedCollection,Date)
public static java.lang.Object min(DatedCollection datedCollection,
java.util.Comparator comparator,
java.util.Date date)
datedCollection - dated collection to be searchedcomparator - comparator used to order the elements (may be null)date - date to search the collection
java.lang.NullPointerException - if datedCollection or date is nullmin(DatedCollection,Date),
max(DatedCollection,Comparator,Date)
public static int binarySearch(DatedList datedList,
java.lang.Object key,
java.util.Date date)
datedList - dated list to be searchedkey - element to look for in the listdate - date to search the list
java.lang.NullPointerException - if datedList or date is null
public static int binarySearch(DatedList datedList,
java.lang.Object key,
java.util.Comparator comparator,
java.util.Date date)
datedList - dated list to be searchedkey - element to look for in the listcomparator - comparator used to order the elements of the list (may be null)date - date to search the list
java.lang.NullPointerException - if datedList or date is null
public static void swap(DatedList datedList,
int i,
int j,
java.util.Date from,
java.util.Date to)
datedList - dated list holding the elements to be swappedi - index of an element to be swappedj - index of the other element to be swappedfrom - start date of range (inclusive) to perform the swapto - end date of range (exclusive) to perform the swap
java.lang.NullPointerException - if datedList, from, or to is null
java.lang.IllegalArgumentException - if from does not precede to
java.lang.IndexOutOfBoundsException - if i > size(d) or j > size(d) for any d
between from and to
public static Dates replaceAll(DatedList datedList,
java.lang.Object oldVal,
java.lang.Object newVal,
java.util.Date from,
java.util.Date to)
datedList - dated list holding the elements to replaceoldVal - element to replacenewVal - element to substitute for oldValfrom - start date of range (inclusive) to perform the substitutionto - end date of range (exclusive) to perform the substitution
java.lang.NullPointerException - if datedList, from, or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static void fill(DatedList datedList,
java.lang.Object obj,
java.util.Date from,
java.util.Date to)
datedList - dated list to fillobj - element to put in listfrom - start date of range (inclusive) to fill the listto - end date of range (exclusive) to fill the list
java.lang.NullPointerException - if datedList, from, or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static int indexOfSubList(DatedList datedList,
java.util.List target,
java.util.Date date)
datedList - dated list to searchtarget - list elements to search fordate - date to check for occurrence in the dated list
java.lang.NullPointerException - if any argument is null
public static int lastIndexOfSubList(DatedList datedList,
java.util.List target,
java.util.Date date)
datedList - dated list to searchtarget - list elements to search fordate - date to check for occurrence in the dated list
java.lang.NullPointerException - if any argument is null
public static void copy(DatedList datedList,
java.util.List src,
java.util.Date from,
java.util.Date to)
datedList - dated list to copy intosrc - list of elements to copyfrom - start date of range (inclusive) to copy intoto - end date of range (exclusive) to copy into
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if from does not precede to
public static DatedSet singletonDatedSet(java.lang.Object o,
java.util.Date from,
java.util.Date to)
o - object to include in the returned setfrom - start date of range (inclusive) for the returned dated set
to contain the objectto - end date of range (exclusive) for the returned dated set
to contain the object
java.lang.NullPointerException - if from or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static DatedList singletonDatedList(java.lang.Object o,
java.util.Date from,
java.util.Date to)
o - object to include in the returned listfrom - start date of range (inclusive) for the returned dated list
to contain the objectto - end date of range (exclusive) for the returned dated list
to contain the object
java.lang.NullPointerException - if from or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static DatedMap singletonDatedMap(java.lang.Object key,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
key - key to include in the returned mapvalue - value to be associated with key in the returned mapfrom - start date of range (inclusive) for the returned dated map
to contain the objectto - end date of range (exclusive) for the returned dated map
to contain the object
java.lang.NullPointerException - if from or to is null
java.lang.IllegalArgumentException - if from does not precede to
public static DatedList nCopies(int n,
java.lang.Object o,
java.util.Date from,
java.util.Date to)
n - number of copies of o to include in the returned listo - object to include in the returned listfrom - start date of range (inclusive) for the returned dated list
to contain n copies of the objectto - end date of range (exclusive) for the returned dated list
to contain n copies of the object
java.lang.NullPointerException - if from or to is null
java.lang.IllegalArgumentException - if from does not precede to
or if n < 0
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||