com.natpryce.makeiteasy.sequence
Class IndexedSequence<T>
java.lang.Object
com.natpryce.makeiteasy.sequence.IndexedSequence<T>
- Type Parameters:
T - the type of the value
- All Implemented Interfaces:
- Donor<T>
public abstract class IndexedSequence<T>
- extends Object
- implements Donor<T>
A sequence of values, each of which is calculated from its index in
the sequence.
|
Method Summary |
T |
value()
Donate the value. |
protected abstract T |
valueAt(int index)
Return the value at a given index. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexedSequence
public IndexedSequence()
value
public T value()
- Description copied from interface:
Donor
- Donate the value.
- Specified by:
value in interface Donor<T>
- Returns:
- the value donated
valueAt
protected abstract T valueAt(int index)
- Return the value at a given index.
- Parameters:
index - the index of the value
- Returns:
- the value at that index
Copyright © 2010. All Rights Reserved.