public class FastQueue<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected List<T> |
data
dynamically-sized buffer of elements
|
protected int |
p
index of next element to fill
|
Constructor and Description |
---|
FastQueue() |
Modifier and Type | Method and Description |
---|---|
void |
add(T o) |
void |
clear() |
T |
get(int i)
Return element i elements ahead of current element.
|
T |
head() |
T |
remove()
Get and remove first element in queue
|
void |
reset() |
int |
size() |
String |
toString()
Return string of current buffer contents; non-destructive
|
public void reset()
public T remove()
public void add(T o)
public int size()
public T head()
public T get(int i)
public void clear()
Copyright © 2020. All rights reserved.