|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QueueList
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 Object[] |
EMPTY_ARRAY
|
Method Summary | |
---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list. |
QueueListEntry |
add(Object o)
Appends the specified element to the end of this list. |
QueueListEntry |
addBefore(Object o,
QueueListEntry node)
Insert an Entry before this entry |
QueueListEntry |
addFirst(Object o)
Inserts the given element at the beginning of this list. |
QueueListEntry |
addLast(Object o)
Appends the given element to the end of this list. |
void |
clear()
Removes all of the elements from this list. |
boolean |
contains(Object o)
Returns true if this list contains the specified element. |
Object |
get(int index)
Returns the element at the specified position in this list. |
Object |
getFirst()
Returns the first element in this list. |
QueueListEntry |
getFirstEntry()
Retrieve the first entry for the linked list |
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(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(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. |
Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
remove(Object o)
Removes the first occurrence of the specified element in this list. |
void |
remove(QueueListEntry node)
Remove a DefaultQueueListEntry |
Object |
removeFirst()
Removes and returns the first element from this list. |
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 |
Object |
set(int index,
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. |
Object[] |
toArray()
Returns an array containing all of the elements in this list in the correct order. |
Field Detail |
---|
static final Object[] EMPTY_ARRAY
Method Detail |
---|
Object getFirst() throws JMSException
JMSException
Object getLast() throws JMSException
JMSException
Object removeFirst() throws JMSException
JMSException
void rotate() throws JMSException
JMSException
Object removeLast() throws JMSException
JMSException
QueueListEntry addFirst(Object o) throws JMSException
o
- the element to be inserted at the beginning of this list.
JMSException
QueueListEntry addLast(Object o) throws JMSException
o
- the element to be inserted at the end of this list.
JMSException
boolean contains(Object o) throws JMSException
o
- element whose presence in this list is to be tested.
JMSException
int size() throws JMSException
JMSException
boolean isEmpty() throws JMSException
JMSException
QueueListEntry add(Object o) throws JMSException
o
- element to be appended to this list.
JMSException
boolean remove(Object o) throws JMSException
o
- element to be removed from this list, if present.
JMSException
void clear() throws JMSException
JMSException
Object get(int index) throws JMSException
index
- index of element to return.
IndexOutOfBoundsException
- if the specified index is is out of range (index < 0 || index >= size()).
JMSException
Object set(int index, Object element) throws JMSException
index
- index of element to replace.element
- element to be stored at the specified position.
IndexOutOfBoundsException
- if the specified index is out of range (index < 0 || index >= size()).
JMSException
void add(int index, Object element) throws JMSException
index
- index at which the specified element is to be inserted.element
- element to be inserted.
IndexOutOfBoundsException
- if the specified index is out of range (index < 0 || index > size()).
JMSException
Object remove(int index) throws JMSException
index
- the index of the element to removed.
IndexOutOfBoundsException
- if the specified index is out of range (index < 0 || index >= size()).
JMSException
int indexOf(Object o) throws JMSException
o
- element to search for.
JMSException
int lastIndexOf(Object o) throws JMSException
o
- element to search for.
JMSException
QueueListEntry getFirstEntry() throws JMSException
JMSException
QueueListEntry getLastEntry() throws JMSException
JMSException
QueueListEntry getNextEntry(QueueListEntry node) throws JMSException
node
-
JMSException
QueueListEntry getPrevEntry(QueueListEntry node) throws JMSException
node
-
JMSException
QueueListEntry addBefore(Object o, QueueListEntry node) throws JMSException
o
- the elment to insertnode
- the Entry to insert the object before
JMSException
void remove(QueueListEntry node) throws JMSException
node
- the DefaultQueueListEntry
JMSException
Object[] toArray() throws JMSException
JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |