|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataStructure<T>
An interface for all the datastructures implemented in this package.
Copyright 2004-2006 Rakesh Vidyadharan
| Field Summary | |
|---|---|
static int |
DYNAMIC
A constant to designate the DynamicCache implementation. |
static int |
FIFO
A constant to designate the FIFO implementation. |
static int |
FIFO_IMPLEMENTATION
Deprecated. Use FIFO |
static int |
LRU
A constant to designate the LRU implementation. |
static int |
LRU_IMPLEMENTATION
Deprecated. Use LRU |
| Method Summary | |
|---|---|
void |
add(T object)
Add the specified object to datastructure. |
void |
clear()
Removes all the objects from the datastructure. |
T |
get()
Return the current Object in the datastructure. |
T |
remove()
Removes the current Object designated for removal
from the datastructure. |
boolean |
remove(T object)
Removes the specified object from the datastructure. |
int |
size()
Returns the size of the datastructure. |
| Field Detail |
|---|
static final int FIFO
FIFO implementation.
@Deprecated static final int FIFO_IMPLEMENTATION
FIFOFIFO implementation.
static final int LRU
LRU implementation.
@Deprecated static final int LRU_IMPLEMENTATION
LRULRU implementation.
static final int DYNAMIC
DynamicCache implementation.
| Method Detail |
|---|
T get()
Object in the datastructure.
void add(T object)
Note: This method does not perform any
synchronisation, and hence is not thread-safe.
Client's must perform their own synchronisation if they so desire.
object - The object to be added to the datastructure.
java.lang.IllegalArgumentException - If a null value was
specified for the object.T remove()
Object designated for removal
from the datastructure.
boolean remove(T object)
Note: This method does not perform any
synchronisation, and hence is not thread-safe.
Client's must perform their own synchronisation if they so desire.
object - The object that is to be removed from the
datastructure.
true if the specified object was
found and removed from the datastructure.void clear()
Note: This method does not perform any
synchronisation, and hence is not thread-safe.
Client's must perform their own synchronisation if they so desire.
int size()
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||