|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a Queue with List like semantics, allowing addition and removal at any point in the queue. Typically this will be implemented using some kind of LinkedList
Field Summary | |
static java.lang.Object[] |
EMPTY_ARRAY
|
Method Summary | |
void |
add(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this list. |
QueueListEntry |
add(java.lang.Object o)
Appends the specified element to the end of this list. |
QueueListEntry |
addBefore(java.lang.Object o,
QueueListEntry node)
Insert an Entry before this entry |
QueueListEntry |
addFirst(java.lang.Object o)
Inserts the given element at the beginning of this list. |
QueueListEntry |
addLast(java.lang.Object o)
Appends the given element to the end of this list. |
void |
clear()
Removes all of the elements from this list. |
boolean |
contains(java.lang.Object o)
Returns true if this list contains the specified element. |
java.lang.Object |
get(int index)
Returns the element at the specified position in this list. |
java.lang.Object |
getFirst()
Returns the first element in this list. |
QueueListEntry |
getFirstEntry()
Retrieve the first entry for the linked list |
java.lang.Object |
getLast()
Returns the last element in this list. |
QueueListEntry |
getLastEntry()
Retrieve the last entry for the linked list |
QueueListEntry |
getNextEntry(QueueListEntry node)
Retrieve the next entry after this entry |
QueueListEntry |
getPrevEntry(QueueListEntry node)
Retrive the previous entry after this entry |
int |
indexOf(java.lang.Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element. |
boolean |
isEmpty()
is the list empty? |
int |
lastIndexOf(java.lang.Object o)
Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element. |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
remove(java.lang.Object o)
Removes the first occurrence of the specified element in this list. |
void |
remove(QueueListEntry node)
Remove a DefaultQueueListEntry |
java.lang.Object |
removeFirst()
Removes and returns the first element from this list. |
java.lang.Object |
removeLast()
Removes and returns the last element from this list. |
void |
rotate()
Move the head of the list to the back of the list |
java.lang.Object |
set(int index,
java.lang.Object element)
Replaces the element at the specified position in this list with the specified element. |
int |
size()
Returns the number of elements in this list. |
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this list in the correct order. |
Field Detail |
public static final java.lang.Object[] EMPTY_ARRAY
Method Detail |
public java.lang.Object getFirst() throws javax.jms.JMSException
javax.jms.JMSException
public java.lang.Object getLast() throws javax.jms.JMSException
javax.jms.JMSException
public java.lang.Object removeFirst() throws javax.jms.JMSException
javax.jms.JMSException
public void rotate() throws javax.jms.JMSException
javax.jms.JMSException
public java.lang.Object removeLast() throws javax.jms.JMSException
javax.jms.JMSException
public QueueListEntry addFirst(java.lang.Object o) throws javax.jms.JMSException
o
- the element to be inserted at the beginning of this list.
javax.jms.JMSException
public QueueListEntry addLast(java.lang.Object o) throws javax.jms.JMSException
o
- the element to be inserted at the end of this list.
javax.jms.JMSException
public boolean contains(java.lang.Object o) throws javax.jms.JMSException
o
- element whose presence in this list is to be tested.
javax.jms.JMSException
public int size() throws javax.jms.JMSException
javax.jms.JMSException
public boolean isEmpty() throws javax.jms.JMSException
javax.jms.JMSException
public QueueListEntry add(java.lang.Object o) throws javax.jms.JMSException
o
- element to be appended to this list.
javax.jms.JMSException
public boolean remove(java.lang.Object o) throws javax.jms.JMSException
o
- element to be removed from this list, if present.
javax.jms.JMSException
public void clear() throws javax.jms.JMSException
javax.jms.JMSException
public java.lang.Object get(int index) throws javax.jms.JMSException
index
- index of element to return.
java.lang.IndexOutOfBoundsException
- if the specified index is is out of range (index < 0 || index >= size()).
javax.jms.JMSException
public java.lang.Object set(int index, java.lang.Object element) throws javax.jms.JMSException
index
- index of element to replace.element
- element to be stored at the specified position.
java.lang.IndexOutOfBoundsException
- if the specified index is out of range (index < 0 || index >= size()).
javax.jms.JMSException
public void add(int index, java.lang.Object element) throws javax.jms.JMSException
index
- index at which the specified element is to be inserted.element
- element to be inserted.
java.lang.IndexOutOfBoundsException
- if the specified index is out of range (index < 0 || index > size()).
javax.jms.JMSException
public java.lang.Object remove(int index) throws javax.jms.JMSException
index
- the index of the element to removed.
java.lang.IndexOutOfBoundsException
- if the specified index is out of range (index < 0 || index >= size()).
javax.jms.JMSException
public int indexOf(java.lang.Object o) throws javax.jms.JMSException
o
- element to search for.
javax.jms.JMSException
public int lastIndexOf(java.lang.Object o) throws javax.jms.JMSException
o
- element to search for.
javax.jms.JMSException
public QueueListEntry getFirstEntry() throws javax.jms.JMSException
javax.jms.JMSException
public QueueListEntry getLastEntry() throws javax.jms.JMSException
javax.jms.JMSException
public QueueListEntry getNextEntry(QueueListEntry node) throws javax.jms.JMSException
node
-
javax.jms.JMSException
public QueueListEntry getPrevEntry(QueueListEntry node) throws javax.jms.JMSException
node
-
javax.jms.JMSException
public QueueListEntry addBefore(java.lang.Object o, QueueListEntry node) throws javax.jms.JMSException
o
- the elment to insertnode
- the Entry to insert the object before
javax.jms.JMSException
public void remove(QueueListEntry node) throws javax.jms.JMSException
node
- the DefaultQueueListEntry
javax.jms.JMSException
public java.lang.Object[] toArray() throws javax.jms.JMSException
javax.jms.JMSException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |