|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.common.queueing.priority.DoublyLinkedList<E>
public class DoublyLinkedList<E>
Helper class used to create double-linked lists.
Constructor Summary | |
---|---|
DoublyLinkedList()
|
Method Summary | |
---|---|
DoublyLinkedNode<E> |
append(E e)
Appends target element to the tail of the doubly-linked list. |
DoublyLinkedNode<E> |
appendAndTrim(E e,
int limit)
Appends target element to the tail of the doubly-linked list, removing as many elements as required from the head of the list so that its size does not exceed the target limit, after appending the target element. |
DoublyLinkedNode<E> |
head()
|
void |
removeHead()
Removes the head element from the head of the doubly-linked list. |
int |
size()
|
DoublyLinkedNode<E> |
tail()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DoublyLinkedList()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int size()
public DoublyLinkedNode<E> head()
public DoublyLinkedNode<E> tail()
public DoublyLinkedNode<E> append(E e) throws GridException
e
- target element
GridException
- if target element is illegalpublic DoublyLinkedNode<E> appendAndTrim(E e, int limit) throws GridException
e
- target elementlimit
- target size
GridException
- if target element is illegalpublic void removeHead() throws GridException
GridException
- if internal data is corrupted
|
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.