Advertisement
jdalbey

ArrayPriorityQueue.java skeleton

Apr 27th, 2015
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.87 KB | None | 0 0
  1. /**
  2.  * ArrayPriorityQueue skeleton implementation
  3.  *
  4.  * @author YOUR NAME HERE
  5.  * @version DATE HERE
  6.  */
  7. public class ArrayPriorityQueue<Element extends Comparable<Element>> implements PriorityQueue<Element>
  8. {
  9.     private Element[] priorityQ;
  10.     public final static int kMaxElements = 10000;
  11.  
  12.     @SuppressWarnings({"unchecked"})    
  13.     public ArrayPriorityQueue()
  14.     {
  15.         priorityQ = (Element[])new Comparable[kMaxElements];
  16.     }
  17.  
  18.     /** {@inheritDoc} */
  19.     public void clear()
  20.     {
  21.     }
  22.  
  23.     /** {@inheritDoc} */
  24.     public Element dequeue()
  25.     {
  26.     }
  27.  
  28.     /** {@inheritDoc} */
  29.     public void enqueue(Element element)
  30.     {
  31.     }
  32.  
  33.     /** {@inheritDoc} */
  34.     public boolean isEmpty()
  35.     {
  36.     }
  37.  
  38.     /** {@inheritDoc} */
  39.     public Element peek()
  40.     {
  41.     }
  42.  
  43.     /** {@inheritDoc} */
  44.     public int size()
  45.     {
  46.     }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement