public class Fifo extends Object
Constructor and Description |
---|
Fifo(int initialSize)
Constructs a Fifo with specified capacity.
|
Modifier and Type | Method and Description |
---|---|
Object |
dequeue()
Dequeues an object.
|
void |
enqueue(Object o)
Enqueues an object.
|
boolean |
isEmpty()
Return indication as to whether the queue is empty.
|
int |
size()
Return the number of currently queued entries.
|
public Fifo(int initialSize)
initialSize
- initial capacitypublic void enqueue(Object o)
o
- object to enqueue, does nothing if nullpublic Object dequeue()
public boolean isEmpty()
public int size()
Copyright © 2023. All rights reserved.