Class SyncList

java.lang.Object
  |
  +--SyncList

public class SyncList
extends java.lang.Object

SyncList is a synchronized Queue, it wraps a linkedList and allows for synchronization.


Constructor Summary
SyncList()
           
 
Method Summary
 void add(java.lang.Object o)
          add's an object to the tail of the queue
 void addFirst(java.lang.Object o)
          adds an Object to the head of the list
 boolean isEmpty()
          is the queue is empty
 java.lang.Object removeFirst()
          removes the first element from the list and returns it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncList

public SyncList()
Method Detail

add

public void add(java.lang.Object o)
add's an object to the tail of the queue

Parameters:
o - the object to add to the queue

isEmpty

public boolean isEmpty()
is the queue is empty

Returns:
true if empty false otherwise

removeFirst

public java.lang.Object removeFirst()
removes the first element from the list and returns it

Returns:
Object the first element from the list

addFirst

public void addFirst(java.lang.Object o)
adds an Object to the head of the list

Parameters:
o - the object to add to the head of the list