Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
/* * Queue.java * * Computer Science 112, Boston University */ /* * A generic interface that defines a simple ADT for a queue of * objects of a particular type T. */ public interface Queue { /* * adds the specified item to the rear of the queue. Returns false * if the list is full, and true otherwise. */ boolean insert(T item); /* * removes the item at the front of the queue and returns a * reference to the removed object. Returns null is the queue is * empty. */ T remove(); /* * returns a reference to the item at the front of the queue without * removing it. Returns null is the queue is empty. */ T peek(); /* returns true if the queue is empty, and false otherwise */ boolean isEmpty(); /* returns true if the queue is full, and false otherwise */ boolean isFull(); }