Interface NodeStore<E>
-
public interface NodeStore<E>This interface is meant to encapsulate the usage ofHashMap<ListID, LongObjectHashMap<ElementType>>The implementation should store the node in such way that you can access it throughgetNode(String, long)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()this is meant to be a quick help to Garbage Collection.LinkedListImpl.Node<E>getNode(String listID, long id)voidremoveNode(E element, LinkedListImpl.Node<E> node)intsize()ths should return the sum of all the sizes.voidstoreNode(E element, LinkedListImpl.Node<E> node)When you store the node, make sure you find what is the ID and ListID for the element you are storing as later one you will need to provide the node based on list and id as specified ongetNode(String, long)
-
-
-
Method Detail
-
storeNode
void storeNode(E element, LinkedListImpl.Node<E> node)
When you store the node, make sure you find what is the ID and ListID for the element you are storing as later one you will need to provide the node based on list and id as specified ongetNode(String, long)
-
getNode
LinkedListImpl.Node<E> getNode(String listID, long id)
-
removeNode
void removeNode(E element, LinkedListImpl.Node<E> node)
-
clear
void clear()
this is meant to be a quick help to Garbage Collection. Whenever the IDSupplier list is being cleared, you should first call the clear method and empty every list before you let the instance go.
-
size
int size()
ths should return the sum of all the sizes. for test assertions.
-
-