PCJ API
Version 1.2

bak.pcj.list
Interface DoubleDeque

All Superinterfaces:
DoubleCollection, DoubleList
All Known Implementing Classes:
DoubleArrayDeque

public interface DoubleDeque
extends DoubleList

This interface represents deques of double values. Deques are lists that have specialized (and efficient) methods for adding and removing elements from the beginning and end.

Since:
1.0
See Also:
LinkedList, DoubleStack

Method Summary
 void addFirst(double v)
          Adds an element to the beginning of this deque.
 void addLast(double v)
          Adds an element to the end of this deque.
 double getFirst()
          Returns the first element of this deque.
 double getLast()
          Returns the last element of this deque.
 double removeFirst()
          Removes the first element of this deque.
 double removeLast()
          Removes the last element of this deque.
 
Methods inherited from interface bak.pcj.list.DoubleList
add, addAll, get, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, removeElementAt, set
 
Methods inherited from interface bak.pcj.DoubleCollection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, trimToSize
 

Method Detail

getFirst

public double getFirst()
Returns the first element of this deque.

Returns:
the first element of this deque.
Throws:
IndexOutOfBoundsException - if this deque is empty.

getLast

public double getLast()
Returns the last element of this deque.

Returns:
the first element of this deque.
Throws:
IndexOutOfBoundsException - if this deque is empty.

removeFirst

public double removeFirst()
Removes the first element of this deque.

Returns:
the element that was removed.
Throws:
IndexOutOfBoundsException - if this deque is empty.

removeLast

public double removeLast()
Removes the last element of this deque.

Returns:
the element that was removed.
Throws:
IndexOutOfBoundsException - if this deque is empty.

addFirst

public void addFirst(double v)
Adds an element to the beginning of this deque.

Parameters:
v - the element to add to this deque.

addLast

public void addLast(double v)
Adds an element to the end of this deque.

Parameters:
v - the element to add to this deque.

PCJ API
Version 1.2

Report a bug or request a feature.
Further information on the development and latest release of PCJ can be found at the project homepage.

Primitive Collections for Java is released under the GNU Lesser General Public License.
Copyright © 2002, 2003 Søren Bak. All Rights Reserved.

Hosted by SourceForge.net
SourceForge.net Logo