T
- Type of the item's to add in this queuepublic class CircularLossyQueue<T> extends Object
Constructor and Description |
---|
CircularLossyQueue(int size)
Constructs the circular queue with the specified capacity
|
Modifier and Type | Method and Description |
---|---|
int |
depth()
Returns the number of items currently in the queue
|
boolean |
isEmtpy()
Returns true if the queue is empty, otherwise false
|
T |
peek()
Returns value at the tail of the queue
|
void |
push(T newVal)
Adds a new item
|
T[] |
toArray(T[] type)
Returns an array of the current elements in the queue.
|
public CircularLossyQueue(int size)
size
- public void push(T newVal)
newVal
- public T[] toArray(T[] type)
type
- public T peek()
public boolean isEmtpy()
public int depth()
Copyright 2001-2019, Terracotta, Inc.