|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.core.BasicList | +--gishur.core.Queue
A simple queue based upon BasicList
.
BasicList
,
Stack
, Serialized FormFields inherited from class gishur.core.BasicList |
ANY_ACCESS, KEY, LISTITEM, NO_ACCESS, VALUE |
Fields inherited from interface gishur.core.ControlledCloneable |
DEEP, FLAT |
Constructor Summary | |
Queue()
Empty constructor. |
Method Summary | |
void |
clear()
Clears the whole queue. |
java.lang.Object |
clone()
Implementation of Cloneable clones the entire list by cloning the contained data-/keyobjects, if possible. |
java.lang.Object |
clone(java.util.Hashtable h,
int level)
clones the entire list according to ControlledCloneable . |
boolean |
contains(java.lang.Object object)
Returns true , if object is stored in this Queue . |
java.lang.Object[] |
convertToArray()
Converts this queue into an array. |
java.util.Enumeration |
elements()
Returns an java.util.Enumerator -object which enumerates all
elements of this queue. |
boolean |
empty()
Returns true , if the queue is empty. |
java.lang.Object |
firstValue()
Returns the first element in the Queue . |
ListView |
getListView()
Creates and returns a ListView -object which enables full
reading access to a BasicList wihtout knowing the explicite type. |
java.lang.Object |
lastValue()
Returns the last element in the Queue . |
int |
length()
Returns the number of stored elements in this queue. |
java.lang.Object |
peek()
Like firstValue() . |
java.lang.Object |
pop()
Returns the first element of the queue and removes it (pops it). |
boolean |
popBoolean()
pop() for boolean -values. |
double |
popDouble()
pop() for double -values. |
float |
popFloat()
pop() for float -values. |
int |
popInt()
pop() for int -values. |
long |
popLong()
pop() for long -values. |
void |
push(boolean b)
push(java.lang.Object) for boolean -values. |
void |
push(double d)
push(java.lang.Object) for double -values. |
void |
push(float f)
push(java.lang.Object) for float -values. |
void |
push(int i)
push(java.lang.Object) for int -values. |
void |
push(long l)
push(java.lang.Object) for long -values. |
void |
push(java.lang.Object object)
Appends an object to this queue. |
java.lang.String |
toString()
Overrides java.lang.Object.toString() . |
Methods inherited from class gishur.core.BasicList |
add, add, allowAccess, contains, copy, copy, copy, cut, cycle, cycle, enumerate, equals, find, findClass, findClosest, first, getDistance, getIndex, getListItem, getListItemArray, getListString, last, move, reconnect, reconnect, remove, requestAccess, reverse, storeInArray, toString, unconnect |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Queue()
Method Detail |
public java.lang.String toString()
java.lang.Object.toString()
.toString
in class BasicList
Object.toString()
public java.lang.Object clone()
Cloneable
clone
in interface Cloneable
clone
in class java.lang.Object
this
object.InternalError
- - if the Object could not be cloned properlyCloneable
public java.lang.Object clone(java.util.Hashtable h, int level)
ControlledCloneable
. That means,
all ListItems
are cloned and connected proper.level
see alsoclone
in interface ControlledCloneable
clone
in class BasicList
h
- Hashtable to indicate which objects are already clonedlevel
- indicates how deep the objects should be clonedInternalError
- - if the Object could not be cloned properlyControlledCloneable
public int length()
length
in class BasicList
public boolean empty()
true
, if the queue is empty.empty
in class BasicList
true
, if the queue is emptypublic boolean contains(java.lang.Object object)
true
, if object
is stored in this Queue
.object
- object to search for in the queuetrue
, if object
is stored in this Queue
public java.lang.Object firstValue()
Queue
. If the
queue is empty, a ListException
will be thrown.public java.lang.Object lastValue()
Queue
. If the
queue is empty, a ListException
will be thrown.public java.lang.Object peek()
firstValue()
.peek()
public void push(java.lang.Object object)
object
- object to storepublic java.lang.Object pop()
public void clear()
clear
in class BasicList
public java.lang.Object[] convertToArray()
public java.util.Enumeration elements()
java.util.Enumerator
-object which enumerates all
elements of this queue.Enumeration
enumerating all elements of this queuepublic ListView getListView()
ListView
-object which enables full
reading access to a BasicList
wihtout knowing the explicite type.getListView
in class BasicList
ListView
-object for full reading accesspublic void push(int i)
push(java.lang.Object)
for int
-values.i
- int
-value to be pushedpush(java.lang.Object)
public void push(long l)
push(java.lang.Object)
for long
-values.i
- long
-value to be pushedpush(java.lang.Object)
public void push(float f)
push(java.lang.Object)
for float
-values.i
- float
-value to be pushedpush(java.lang.Object)
public void push(double d)
push(java.lang.Object)
for double
-values.i
- double
-value to be pushedpush(java.lang.Object)
public void push(boolean b)
push(java.lang.Object)
for boolean
-values.i
- boolean
-value to be pushedpush(java.lang.Object)
public int popInt()
pop()
for int
-values. If the first object in the
queue cannot be converted into an int
, a ListException
is thrown.int
pop()
public long popLong()
pop()
for long
-values. If the first object in the
queue cannot be converted into a long
, a ListException
is thrown.long
pop()
public float popFloat()
pop()
for float
-values. If the first object in the
queue cannot be converted into a float
, a ListException
is thrown.float
pop()
public double popDouble()
pop()
for double
-values. If the first object in the
queue cannot be converted into a double
, a ListException
is thrown.double
pop()
public boolean popBoolean()
pop()
for boolean
-values. If the first object in the
queue cannot be converted into a boolean
, a ListException
is thrown.boolean
pop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |