|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.common.queueing.deque.LinkedListDeque<T>
public class LinkedListDeque<T>
Implements a Deque using a doubly linked list.
Original, unlicensed version written by Geoff Knagge (9806135), last modified 14/8/1999.
This version synthesized and heavily patched by Cyril Briquet, last modified 04/02/2007.
Note: the sole purpose of this class is to provide a J2SE 5.0 implementation of a Deque.
Constructor Summary | |
---|---|
LinkedListDeque()
|
Method Summary | |
---|---|
java.util.Iterator<T> |
descendingIterator()
|
T |
firstElement()
Returns the object to the head of the Deque. |
void |
insertFirst(T o)
Inserts target Object at the head of the Deque. |
void |
insertLast(T o)
Inserts target Object at the tail of the Deque. |
boolean |
isEmpty()
|
java.util.Iterator<T> |
iterator()
|
T |
lastElement()
Returns the object to the tail of the Deque. |
T |
removeFirst()
Returns the object to the head of the Deque, and removes that Object. |
T |
removeLast()
Returns the object to the tail of the Deque, and removes that Object. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedListDeque()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Deque<T>
public int size()
size
in interface Deque<T>
public void insertFirst(T o) throws GridException
insertFirst
in interface Deque<T>
GridException
public void insertLast(T o) throws GridException
insertLast
in interface Deque<T>
GridException
public T removeFirst() throws GridException
removeFirst
in interface Deque<T>
GridException
public T removeLast() throws GridException
removeLast
in interface Deque<T>
GridException
public T firstElement() throws GridException
firstElement
in interface Deque<T>
GridException
public T lastElement() throws GridException
lastElement
in interface Deque<T>
GridException
public java.util.Iterator<T> iterator()
iterator
in interface Deque<T>
public java.util.Iterator<T> descendingIterator()
descendingIterator
in interface Deque<T>
|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.