Package com.github.basking2.sdsai.dsds
Class PagedListLocation<STOREKEY>
- java.lang.Object
-
- com.github.basking2.sdsai.dsds.PagedListLocation<STOREKEY>
-
public class PagedListLocation<STOREKEY> extends java.lang.ObjectThis is mostly a wrapper aroundNodebut also includes some meta information about where in the page of data represented by a Node in PagedList.
-
-
Constructor Summary
Constructors Constructor Description PagedListLocation(NodeStore<STOREKEY,STOREKEY,?> nodeStore, STOREKEY key)PagedListLocation(NodeStore<STOREKEY,STOREKEY,?> nodeStore, STOREKEY key, Node<STOREKEY,STOREKEY> node)PagedListLocation(NodeStore<STOREKEY,STOREKEY,?> nodeStore, STOREKEY key, Node<STOREKEY,STOREKEY> node, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description STOREKEYgetData()Return the data element stored in the node atgetIndex().intgetIndex()STOREKEYgetKey()Node<STOREKEY,STOREKEY>getNode()PagedListLocation<STOREKEY>index(int index)Set the index / position of this PagedListLocation and return this.PagedListLocation<STOREKEY>next()STOREKEYnextKey()PagedListLocation<STOREKEY>prev()STOREKEYprevKey()voidremove()Calls store on the nodeStore with the current key and node.voidsetKey(STOREKEY key)Set the key at which this node is stored.intsize()voidstore()Calls store on the nodeStore with the current key and node.
-
-
-
Method Detail
-
nextKey
public STOREKEY nextKey()
-
prevKey
public STOREKEY prevKey()
-
next
public PagedListLocation<STOREKEY> next()
-
prev
public PagedListLocation<STOREKEY> prev()
-
index
public PagedListLocation<STOREKEY> index(int index)
Set the index / position of this PagedListLocation and return this.- Returns:
- this
-
getIndex
public int getIndex()
-
getData
public STOREKEY getData()
Return the data element stored in the node atgetIndex().
-
getKey
public STOREKEY getKey()
-
setKey
public void setKey(STOREKEY key)
Set the key at which this node is stored.
-
store
public void store()
Calls store on the nodeStore with the current key and node.
-
remove
public void remove()
Calls store on the nodeStore with the current key and node.
-
size
public int size()
-
-