|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ou.kmi.buddyspace.core.BSConsumerList
BSConsumerList
is list of packet/event consumers devided into
several levels of priority.
The priority level are numbers from 0 to levelNum-1.
The higher number, the higher priority.
Constructor Summary | |
BSConsumerList(int levelNum)
|
Method Summary | |
void |
addFirst(java.lang.Object object,
int level)
Inserts the object as the first one in given level |
void |
addLast(java.lang.Object object,
int level)
Inserts the object as the last one in given level |
void |
clear()
Removes all consumers |
boolean |
contains(java.lang.Object object)
Returns if the consumer list contains the object |
boolean |
contains(java.lang.Object object,
int level)
Returns if the consumer list contains the object on given level |
java.util.Enumeration |
getConsumers()
Returns list of all objects sorted according to their priority and the order in each priority level. |
boolean |
remove(java.lang.Object object)
Removes occurence of the object with the highest priority |
boolean |
remove(java.lang.Object object,
int level)
Removes occurence of the object with the highest priority on given level |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BSConsumerList(int levelNum)
Method Detail |
public void addLast(java.lang.Object object, int level) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void addFirst(java.lang.Object object, int level) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public java.util.Enumeration getConsumers()
public boolean remove(java.lang.Object object)
public boolean remove(java.lang.Object object, int level) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void clear()
public boolean contains(java.lang.Object object)
public boolean contains(java.lang.Object object, int level) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |