JLab

dataStructures
Class ArrayListQueue

java.lang.Object
  extended by dataStructures.ArrayListQueue
All Implemented Interfaces:
Queue

public class ArrayListQueue
extends java.lang.Object
implements Queue

คลาสที่สร้างแถวคอยด้วย ArrayList

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

Constructor Summary
ArrayListQueue(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

ArrayListQueue

public ArrayListQueue(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 Queue

dequeue

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

JLab