public class QueueWithSpare<E> extends Object
Queue
Created by Jeff Gaynor
on 2/20/12 at 9:56 AM
Constructor and Description |
---|
QueueWithSpare() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
E |
getSpare() |
boolean |
isEmpty()
Slightly different than expected: This return true if there are no elements in the
queue proper AND the spare is null.
|
E |
pop() |
boolean |
push(E e) |
E |
remove() |
void |
setSpare(E spare) |
int |
size() |
public E getSpare()
public void setSpare(E spare)
public boolean push(E e)
public E pop()
public E remove()
public int size()
public boolean isEmpty()
size()
== 0 to check if there
are no elements in this queue.public void clear()
Copyright © 2019. All Rights Reserved.