T
- public class BDEQueue<T> extends IDEStructure<T>
IStructure.Backoff, IStructure.Node<T>
abort
Constructor and Description |
---|
BDEQueue(int capacity)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(T item)
Add a item to the data structure
|
T |
getFromTop()
Retrieve a element
|
boolean |
isEmpty()
return true if the data structure is empty; otherwise false
|
boolean |
isFull()
Method to tell if the data structure is full.
|
T |
remove()
retrieve a object of type T
|
boolean |
tryAdd(T item)
try to add element of type T.
|
add, get, registerThread, shutdown
public BDEQueue(int capacity)
capacity
- of bounded double ended queuepublic T getFromTop()
IDEStructure
getFromTop
in class IDEStructure<T>
public void add(T item)
add
in class IStructure<T>
public boolean isEmpty()
isEmpty
in class IStructure<T>
public T remove()
IStructure
remove
in class IStructure<T>
public boolean isFull()
IDEStructure
isFull
in class IDEStructure<T>
public boolean tryAdd(T item)
IDEStructure
tryAdd
in class IDEStructure<T>