Package com.github.basking2.sdsai.dsds
Class PagedList<STOREKEY,V>
- java.lang.Object
-
- com.github.basking2.sdsai.dsds.PagedList<STOREKEY,V>
-
- All Implemented Interfaces:
java.lang.Iterable<V>,java.util.Collection<V>,java.util.List<V>
public class PagedList<STOREKEY,V> extends java.lang.Object implements java.util.List<V>A circularly linked list in which each list element many data elements. This list does very well for in-order aggregation but quickly fragments if elements are inserted at arbitrary indexes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, V value)booleanadd(V value)booleanaddAll(int index, java.util.Collection<? extends V> c)booleanaddAll(java.util.Collection<? extends V> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)voiddestroy()Clear this list withclear()and then delete the empty head node.voideachPage(NodeFunction<STOREKEY,STOREKEY> nodeFunction)voideachPage(NodeFunction<STOREKEY,STOREKEY> nodeFunction, STOREKEY startKey)booleanequals(java.lang.Object o)Vget(int index)intindexOf(java.lang.Object o)booleanisEmpty()java.util.Iterator<V>iterator()intlastIndexOf(java.lang.Object o)java.util.ListIterator<V>listIterator()java.util.ListIterator<V>listIterator(int index)java.util.Iterator<Node<STOREKEY,STOREKEY>>pageIterator()Vremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)java.util.Iterator<Node<STOREKEY,STOREKEY>>reversePageIterator()Vset(int index, V value)intsize()java.util.List<V>subList(int fromIndex, int toIndex)java.lang.Object[]toArray()<T> T[]toArray(T[] t)
-
-
-
Method Detail
-
eachPage
public void eachPage(NodeFunction<STOREKEY,STOREKEY> nodeFunction)
-
eachPage
public void eachPage(NodeFunction<STOREKEY,STOREKEY> nodeFunction, STOREKEY startKey)
-
add
public boolean add(V value)
-
addAll
public boolean addAll(java.util.Collection<? extends V> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends V> c)- Specified by:
addAllin interfacejava.util.List<STOREKEY>
-
clear
public void clear()
-
destroy
public void destroy()
Clear this list withclear()and then delete the empty head node.
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
equals
public boolean equals(java.lang.Object o)
-
isEmpty
public boolean isEmpty()
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOfin interfacejava.util.List<STOREKEY>
-
iterator
public java.util.Iterator<V> iterator()
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOfin interfacejava.util.List<STOREKEY>
-
listIterator
public java.util.ListIterator<V> listIterator()
- Specified by:
listIteratorin interfacejava.util.List<STOREKEY>
-
listIterator
public java.util.ListIterator<V> listIterator(int index)
- Specified by:
listIteratorin interfacejava.util.List<STOREKEY>
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
size
public int size()
-
subList
public java.util.List<V> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfacejava.util.List<STOREKEY>
-
toArray
public java.lang.Object[] toArray()
-
-