Modifier and Type | Field and Description |
---|---|
int[] |
array |
MemoryPool |
pool |
int |
start |
int |
stop |
Constructor and Description |
---|
IntQueue(MemoryPool pool) |
Modifier and Type | Method and Description |
---|---|
void |
add(int element)
adds an int at the end of the FIFO
|
void |
clear() |
boolean |
isEmpty() |
Iterator<Integer> |
iterator() |
int |
peek()
inspection of the first element, without removal
|
int |
pop()
takes the first element, removes it from the FIFO and returns it
|
int |
size() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public int[] array
public int start
public int stop
public MemoryPool pool
public IntQueue(MemoryPool pool)
public void clear()
public boolean isEmpty()
public void add(int element)
element
- the element to addpublic int peek()
public int pop()
public int size()
Copyright © 2022. All rights reserved.