JLab

dataStructures
Class ArrayPQ

java.lang.Object
  extended by dataStructures.ArrayPQ
All Implemented Interfaces:
PriorityQueue, Queue

public class ArrayPQ
extends java.lang.Object
implements PriorityQueue

คลาสที่สร้างแถวคอยเชิงบุริมภาพด้วย ArrayList

Author:
สมชาย ประสิทธิ์จูตระกูล

Constructor Summary
ArrayPQ(int cap)
           
 
Method Summary
 java.lang.Object dequeue()
           
 void enqueue(java.lang.Object e)
           
 boolean isEmpty()
           
 java.lang.Object peek()
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayPQ

public ArrayPQ(int cap)
Method Detail

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Queue

size

public int size()
Specified by:
size in interface Queue

enqueue

public void enqueue(java.lang.Object e)
Specified by:
enqueue in interface Queue

peek

public java.lang.Object peek()
Specified by:
peek in interface PriorityQueue
Specified by:
peek in interface Queue

dequeue

public java.lang.Object dequeue()
Specified by:
dequeue in interface PriorityQueue
Specified by:
dequeue in interface Queue

JLab