|
|||||||||
| 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.AbstractSequentialDatedList
A partial implementation of a dated list that does not provide random access to its elements at a given date. The purpose of this class is to make it easier to implement a sequential dated list. All of the methods implemented in this class operate on the list iterator, which is defined by a subclass.
To create an unmodifiable list, the programmer can subclass this class and implement listIterator(int). The list iterator returned by this method need only define the query methods: hasNext, hasPrevious, next, nextIndex, previous, and previousIndex. The remaining methods should throw UnsupportedOperationExceptions.
To create a modifiable list, the programmer must implement the above methods that throw UnsupportedOperationExceptions.
Upon subclassing this class, the programmer may wish to override those methods that can be implemented more efficiently with knowledge of the underlying data structure.
This class is not Serializable or Cloneable. Subclasses are free to decide if they wish to implement these interfaces.
AbstractDatedList,
DatedList| Field Summary |
| Fields inherited from interface sos.dated.util.DatedObject |
MAX_DATE, MIN_DATE |
| Constructor Summary | |
AbstractSequentialDatedList()
No-argument constructor available only to subclasses. |
|
| Method Summary | |
void |
add(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
This implementation invokes the list iterator's add method for each list iterator at a change date between from and to. |
java.lang.Object |
get(int index,
java.util.Date date)
This implementation uses the list iterator at date and positioned at index to retrieve the element. |
abstract ListIterator |
listIterator(int index,
java.util.Date date)
Returns a list iterator over the elements of this dated list at the specified date, starting at the specified index. |
DatedValue |
remove(int index,
java.util.Date from,
java.util.Date to)
This implementation invokes remove on the list iterator at each change date between from and to. |
DatedValue |
set(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
This implementation invokes set on the list iterator at each change date between from and to. |
| Methods inherited from class sos.dated.util.AbstractDatedList |
add, addAll, checkForComodification, clear, clone, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, modCount, removeRange, size, subList, upModCount |
| Methods inherited from class sos.dated.util.AbstractDatedCollection |
addAll, contains, containsAll, containsThroughout, dateIterator, 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.DatedCollection |
addAll, contains, containsAll, containsThroughout, excludesThroughout, hasSizeThroughout, isEmpty, isEmptyThroughout, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from interface sos.dated.util.DatedObject |
dateIterator, dateIterator, equals, hashCode, toString |
| Constructor Detail |
public AbstractSequentialDatedList()
| Method Detail |
public void add(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
add in interface DatedListadd in class AbstractDatedList
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
public abstract ListIterator listIterator(int index,
java.util.Date date)
AbstractDatedList
listIterator in interface DatedListlistIterator in class AbstractDatedList
public DatedValue remove(int index,
java.util.Date from,
java.util.Date to)
remove in interface DatedListremove in class AbstractDatedList
public DatedValue set(int index,
java.lang.Object value,
java.util.Date from,
java.util.Date to)
set in interface DatedListset in class AbstractDatedList
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||