JML

org.jmlspecs.samples.jmlkluwer
Class PriorityQueue

java.lang.Object
  extended byorg.jmlspecs.samples.jmlkluwer.PriorityQueue
All Implemented Interfaces:
PriorityQueueUser

public class PriorityQueue
extends Object
implements PriorityQueueUser


Field Summary
private  ArrayList levels
           
private  long nextTS
           
 
Constructor Summary
PriorityQueue()
           
 
Method Summary
 void addEntry(Object argObj, int argPriorityLevel)
           
 boolean contains(Object argObj)
           
private  ArrayList getLevelList(int argPriorityLevel)
           
private  int getLevelOf(Object levelList)
           
private  int getLevelOf(ArrayList levelList)
           
 boolean isEmpty()
           
 Object next()
           
 void remove(Object argObj)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

levels

private ArrayList levels

nextTS

private long nextTS
Constructor Detail

PriorityQueue

public PriorityQueue()
Method Detail

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

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.