public class CircularArray<T> extends IStructure<T>
IStructure.Backoff, IStructure.Node<T>
abort
Constructor and Description |
---|
CircularArray(int logCapacity)
Constructor to define the class type of the objects that
should be stored in the array.
|
Modifier and Type | Method and Description |
---|---|
void |
add(T item)
Deprecated.
|
void |
add(T item,
int i)
add a object of type T
|
T |
get(int i)
retrieve a object of type T
|
int |
getCapacity() |
boolean |
isEmpty()
Deprecated.
|
T |
remove()
Deprecated.
|
CircularArray<T> |
resize(int bottom,
int top) |
registerThread, shutdown
public CircularArray(int logCapacity)
logCapacity
- capacity of the initial arraypublic int getCapacity()
public T get(int i)
IStructure
get
in class IStructure<T>
@Deprecated public void add(T item)
IStructure
add
in class IStructure<T>
public void add(T item, int i)
IStructure
add
in class IStructure<T>
public CircularArray<T> resize(int bottom, int top)
@Deprecated public boolean isEmpty()
IStructure
isEmpty
in class IStructure<T>
@Deprecated public T remove()
IStructure
remove
in class IStructure<T>