public abstract class AbstractQueue
extends java.lang.Object
Constructor and Description |
---|
AbstractQueue() |
Modifier and Type | Method and Description |
---|---|
int |
getLength()
returns the length of the queue.
|
boolean |
getSourceAlive()
returns true if the source i.e., the thread which pushes objects into the queue
is alive, else returns false.
|
java.lang.Object |
pop()
pops the first element of the queue.
|
void |
push(java.lang.Object obj)
inserts the obj at the end of the queue.
|
void |
setSourceAlive(boolean value)
sets if the source i.e., the thread which pushes objects into the queue
is alive
|
public java.lang.Object pop()
java.lang.Object
valuepublic void push(java.lang.Object obj)
obj
- a java.lang.Object
value to be inserted into the queue.public int getLength()
int
valuepublic void setSourceAlive(boolean value)
value
- a boolean
valuepublic boolean getSourceAlive()
boolean
value