|
|||||||||
| 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.AbstractDatedCollection
|
+--sos.dated.util.AbstractDatedList
|
+--sos.dated.util.ArrayListByElement
An implementation of DatedList that uses a single java.util.ArrayList to
efficiently add and set values.
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 list with a call to DatedCollections.synchronizedDatedList.
ArrayListByDate,
DatedList,
DatedCollections.synchronizedDatedList(DatedList)| Field Summary |
| Fields inherited from interface sos.dated.util.DatedObject |
MAX_DATE, MIN_DATE |
| Constructor Summary | |
ArrayListByElement()
Creates a new instance of ArrayListByElement |
|
ArrayListByElement(DatedCollection datedCollection)
|
|
ArrayListByElement(int initialCapacity)
|
|
| Method Summary | |
void |
add(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
Inserts an element into the list for a specified date range (optional operation). |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
DateIterator |
dateIterator(java.util.Date date)
Returns an iterator of the date ranges of when this dated type has changed. |
java.lang.Object |
get(int index,
java.util.Date date)
Retrieves the element at the specified position on the specified date. |
DatedValue |
remove(int index,
java.util.Date from,
java.util.Date to)
Removes from this list the element at the specified position for the specified date range (optional operation). |
DatedValue |
set(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
Replaces the element at the specified position with the specified element for the specified date range. |
int |
size(java.util.Date date)
Returns the number of elements in this collection at the specified date. |
| Methods inherited from class sos.dated.util.AbstractDatedList |
add, addAll, checkForComodification, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, modCount, removeRange, subList, upModCount |
| Methods inherited from class sos.dated.util.AbstractDatedCollection |
addAll, contains, containsAll, containsThroughout, excludesThroughout, hasSizeThroughout, isEmpty, isEmptyThroughout, remove, removeAll, retainAll, toArray, toArray, 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.DatedList |
addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, subList |
| Methods inherited from interface sos.dated.util.DatedCollection |
add, addAll, clear, contains, containsAll, containsThroughout, excludesThroughout, hasSizeThroughout, isEmpty, isEmptyThroughout, iterator, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from interface sos.dated.util.DatedObject |
dateIterator, equals, hashCode, toString |
| Constructor Detail |
public ArrayListByElement()
public ArrayListByElement(DatedCollection datedCollection)
public ArrayListByElement(int initialCapacity)
| Method Detail |
public void add(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
DatedList
add in interface DatedListadd in class AbstractDatedListindex - position to insert the elementvalue - element to insertfrom - starting date at which the element should be insertedto - ending date at which the element should be insertedpublic java.lang.Object clone()
AbstractDatedListclone method.
clone in class AbstractDatedListpublic DateIterator dateIterator(java.util.Date date)
dateIterator in interface DatedObjectdateIterator in class AbstractDatedCollectiondate - date to position the iteration
java.lang.IllegalArgumentException - if from does not precede to
public java.lang.Object get(int index,
java.util.Date date)
get in interface DatedListget in class AbstractDatedListindex - position to retrieve an elementdate - date at which this list is to be queried
java.lang.NullPointerException - if date is null
java.lang.IllegalArgumentException - if index < 0
public DatedValue set(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
DatedList
set in interface DatedListset in class AbstractDatedListindex - position to place the elementvalue - element to place in this listfrom - starting date at which the position should be setto - ending date at which the position should be setpublic int size(java.util.Date date)
DatedCollection
size in interface DatedCollectionsize in class AbstractDatedListdate - date at which this collection is to be queried
public DatedValue remove(int index,
java.util.Date from,
java.util.Date to)
DatedList
remove in interface DatedListremove in class AbstractDatedListindex - position at which to start the iterationfrom - starting date at which the element should be removedto - ending date at which the element should be removed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||