mud.server
Class WaitQueue<E>

java.lang.Object
  extended by mud.server.WaitQueue<E>

public class WaitQueue<E>
extends java.lang.Object

An Object Orientated implementation of the WaitQueue. (Locked based)

Author:
Phyx

Constructor Summary
WaitQueue()
          Create a new WaitQueue
 
Method Summary
 E pop()
          Gets an item out of the queue, or blocks untill one is available
 void push(E item)
          Add a new item to the queue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaitQueue

public WaitQueue()
Create a new WaitQueue

Method Detail

push

public void push(E item)
Add a new item to the queue

Parameters:
item - Item to add

pop

public E pop()
Gets an item out of the queue, or blocks untill one is available

Returns:
item to use