public interface ListContainer<V> extends List<V>
Modifier and Type | Method and Description |
---|---|
void |
addFirst(V o)
Inserts the given element at the beginning of this list.
|
void |
addLast(V o)
Appends the given element to the end of this list.
|
boolean |
doRemove(int position)
remove an objecr from the list without retrieving the old value from the
store
|
V |
get(StoreEntry entry)
Retrieve an Object from the Store by its location
|
StoreEntry |
getFirst()
Get the StoreEntry for the first item of the list
|
Object |
getId() |
StoreEntry |
getLast()
Get the StoreEntry for the last item of the list
|
StoreEntry |
getNext(StoreEntry entry)
Get the next StoreEntry from the list
|
StoreEntry |
getPrevious(StoreEntry entry)
Get the previous StoreEntry from the list
|
boolean |
isLoaded() |
void |
load()
The container is created or retrieved in an unloaded state.
|
StoreEntry |
placeFirst(V object)
insert an Object in first position int the list but get a StoreEntry of
its position
|
StoreEntry |
placeLast(V object)
add an Object to the list but get a StoreEntry of its position
|
StoreEntry |
refresh(StoreEntry entry)
It's possible that a StoreEntry could be come stale this will return an
upto date entry for the StoreEntry position
|
boolean |
remove(StoreEntry entry)
remove the Object at the StoreEntry
|
V |
removeFirst()
Removes and returns the first element from this list.
|
V |
removeLast()
Removes and returns the last element from this list.
|
void |
setMarshaller(Marshaller marshaller)
For homogenous containers can set a custom marshaller for loading values
The default uses Object serialization
|
int |
size() |
void |
unload()
unload indexes from the container
|
void |
update(StoreEntry entry,
V object)
Advanced feature = must ensure the object written doesn't overwrite other
objects in the container
|
void load()
void unload()
boolean isLoaded()
void setMarshaller(Marshaller marshaller)
marshaller
- int size()
void addFirst(V o)
o
- the element to be inserted at the beginning of this list.void addLast(V o)
o
- the element to be inserted at the end of this list.V removeFirst()
NoSuchElementException
- if this list is empty.V removeLast()
NoSuchElementException
- if this list is empty.boolean doRemove(int position)
position
- StoreEntry placeLast(V object)
object
- StoreEntry placeFirst(V object)
object
- void update(StoreEntry entry, V object)
entry
- object
- V get(StoreEntry entry)
entry
- StoreEntry getFirst()
StoreEntry getLast()
StoreEntry getNext(StoreEntry entry)
entry
- StoreEntry getPrevious(StoreEntry entry)
entry
- boolean remove(StoreEntry entry)
entry
- StoreEntry refresh(StoreEntry entry)
entry
- old entryCopyright © 2005–2014. All rights reserved.