org.objectweb.dream.queue
Interface ListRemoveFirstLast

All Known Implementing Classes:
ListAddRemoveFirstLastFastImpl, ListAddRemoveFirstLastImpl

public interface ListRemoveFirstLast

This interface defines methods that must be implemented by a list that allows getting/removing messages from the end or beginning of the list.


Field Summary
static String ITF_NAME
          The commonly used name to refer to this interface.
 
Method Summary
 Object getFirst()
          Returns the first element in this list.
 Object getLast()
          Returns the last element in this list.
 Object removeFirst()
          Removes and returns the first element from this list.
 Object removeLast()
          Removes and returns the last element from this list.
 

Field Detail

ITF_NAME

public static final String ITF_NAME
The commonly used name to refer to this interface.

See Also:
Constant Field Values
Method Detail

getFirst

public Object getFirst()
Returns the first element in this list.

Returns:
the first element in this list.
Throws:
NoSuchElementException - if this list is empty.

getLast

public Object getLast()
Returns the last element in this list.

Returns:
the last element in this list.
Throws:
NoSuchElementException - if this list is empty.

removeFirst

public Object removeFirst()
Removes and returns the first element from this list.

Returns:
the first element from this list.

removeLast

public Object removeLast()
Removes and returns the last element from this list.

Returns:
the last element from this list.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.