|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.queue.ListAddRemoveFirstLastFastImpl
The ListAddRemoveFirstLastFastImpl class is just a linked list that supports very efficient insertion and deletion, as well as an Enumeration interface.
Note: None of the methods in this linked list are synchronized.
This class is freely inspired from code belonging to the SEDA project (see http://sourceforge.net/projects/seda/).
Nested Class Summary | |
static class |
ListAddRemoveFirstLastFastImpl.Element
This class represents elements of a linked list. |
class |
ListAddRemoveFirstLastFastImpl.FastLinkedListEnumeration
A FastLinkedListEnumeration is a java.util.Enumeration over the ListAddRemoveFirstLastFastImpl elements. |
Field Summary | |
protected ObjectPool |
objectPoolItf
The client interface used to access the pool of ListAddRemoveFirstLastFastImpl.Element instances. |
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.queue.List |
ITF_NAME |
Fields inherited from interface org.objectweb.dream.queue.ListAddFirstLast |
ITF_NAME |
Fields inherited from interface org.objectweb.dream.queue.ListRemoveFirstLast |
ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
ListAddRemoveFirstLastFastImpl()
Allocates a brand new ListAddRemoveFirstLastFastImpl. |
Method Summary | |
void |
add(Object o)
Adds the specified element to the list. |
void |
addFirst(Object o)
Inserts the given element at the beginning of this list. |
void |
addLast(Object o)
Appends the given element to the end of this list. |
void |
bindFc(String clientItfName,
Object serverItf)
|
Enumeration |
elements()
Returns a java.util.Enumeration enumeration over the elements of the linked list. |
Object |
getFirst()
Returns the first element in this list. |
Object |
getItem(Object known)
Returns the first object that is "equal" to the given object, based on the response of the Object.equals() method. |
Object |
getLast()
Returns the last element in this list. |
boolean |
isEmpty()
Returns true if the list is empty. |
String[] |
listFc()
|
Object |
remove()
Removes an object from the list. |
Object |
removeFirst()
Removes and returns the first element from this list. |
Object |
removeItem(Object known)
Removes the first object that is "equal" to the given object, based on the response of the Object.equals() method. |
Object |
removeLast()
Removes and returns the last element from this list. |
String |
toString()
|
Methods inherited from class org.objectweb.dream.AbstractComponent |
beforeFirstStart, getFcState, initComponent, lookupFc, setLogger, startFc, stopFc, unbindFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected ObjectPool objectPoolItf
ListAddRemoveFirstLastFastImpl.Element
instances.
Constructor Detail |
public ListAddRemoveFirstLastFastImpl()
Method Detail |
public void add(Object o)
List
add
in interface List
o
- element to be added to this list.List.add(Object)
public Object remove()
List
remove
in interface List
null
if the list is empty.List.remove()
public boolean isEmpty()
List
true
if the list is empty.
isEmpty
in interface List
true
if the list is empty.List.isEmpty()
public void addLast(Object o)
ListAddFirstLast
addLast
in interface ListAddFirstLast
o
- the element to be inserted at the end of this list.ListAddFirstLast.addLast(Object)
public void addFirst(Object o)
ListAddFirstLast
addFirst
in interface ListAddFirstLast
o
- the element to be inserted at the beginning of this list.ListAddFirstLast.addFirst(Object)
public Object getLast()
ListRemoveFirstLast
getLast
in interface ListRemoveFirstLast
ListRemoveFirstLast.getLast()
public Object removeLast()
ListRemoveFirstLast
removeLast
in interface ListRemoveFirstLast
ListRemoveFirstLast.removeLast()
public Object getFirst()
ListRemoveFirstLast
getFirst
in interface ListRemoveFirstLast
ListRemoveFirstLast.getFirst()
public Object removeFirst()
ListRemoveFirstLast
removeFirst
in interface ListRemoveFirstLast
ListRemoveFirstLast.removeFirst()
public Object getItem(Object known)
known
- the object to which an element must be equal.
public Object removeItem(Object known)
known
- the object to which an element must be equal.
public Enumeration elements()
Enumeration
public String toString()
Object.toString()
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String,
Object)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |