public class LinkedListWithSum<E>
extends java.util.AbstractSequentialList<E>
implements java.util.List<E>
constructor. Current sum can be obtained via getSum().
This class is not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
class |
LinkedListWithSum.ListIterator |
| Constructor and Description |
|---|
LinkedListWithSum(java.util.function.ToIntFunction<? super E> evaluator) |
| Modifier and Type | Method and Description |
|---|---|
long |
getSum() |
LinkedListWithSum.ListIterator |
listIterator(int index) |
int |
size() |
add, addAll, get, iterator, remove, setadd, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArraypublic LinkedListWithSum(java.util.function.ToIntFunction<? super E> evaluator)
public long getSum()
public int size()
public LinkedListWithSum.ListIterator listIterator(int index)