org.tinygroup.jspengine.util
类 Queue

java.lang.Object
  继承者 org.tinygroup.jspengine.util.Queue

public class Queue
extends Object

A simple FIFO queue class which causes the calling thread to wait if the queue is empty and notifies threads that are waiting when it is not empty.

作者:
Anil V (akv@eng.sun.com)

构造方法摘要
Queue()
           
 
方法摘要
 Object get()
          Get the first object out of the queue.
 boolean isEmpty()
          Is the queue empty?
 Object peek()
          Peek to see if something is available.
 Object pull()
          Pull the first object out of the queue.
 void put(Object object)
          Put the object into the queue.
 int size()
          How many elements are there in this queue?
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Queue

public Queue()
方法详细信息

put

public void put(Object object)
Put the object into the queue.

参数:
object - the object to be appended to the queue.

pull

public Object pull()
Pull the first object out of the queue. Wait if the queue is empty.


get

public Object get()
Get the first object out of the queue. Return null if the queue is empty.


peek

public Object peek()
Peek to see if something is available.


isEmpty

public boolean isEmpty()
Is the queue empty?


size

public int size()
How many elements are there in this queue?



Copyright © 2006–2014 开源组织. All rights reserved.