org.jmlspecs.samples.jmlkluwer
Class PriorityQueue
java.lang.Object
org.jmlspecs.samples.jmlkluwer.PriorityQueue
- All Implemented Interfaces:
- PriorityQueueUser
- public class PriorityQueue
- extends Object
- implements PriorityQueueUser
levels
private ArrayList levels
nextTS
private long nextTS
PriorityQueue
public PriorityQueue()
addEntry
public void addEntry(Object argObj,
int argPriorityLevel)
throws PQException
- Throws:
PQException
getLevelList
private ArrayList getLevelList(int argPriorityLevel)
getLevelOf
private int getLevelOf(ArrayList levelList)
getLevelOf
private int getLevelOf(Object levelList)
contains
public boolean contains(Object argObj)
- Specified by:
contains in interface PriorityQueueUser
next
public Object next()
throws PQException
- Specified by:
next in interface PriorityQueueUser
- Throws:
PQException
remove
public void remove(Object argObj)
- Specified by:
remove in interface PriorityQueueUser
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface PriorityQueueUser
toString
public String toString()
- Overrides:
toString in class Object
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.