|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ActiveList
Constructor Summary | |
ActiveList()
Initializes the list and the active index. |
|
ActiveList(java.lang.Object obj)
Initializes the list with the specified object, setting it as the active object. |
Method Summary | |
void |
addActiveObject(java.lang.Object obj)
Adds the object to the list and selects it as the active object |
void |
addObject(java.lang.Object obj)
|
boolean |
containsObjectName(java.lang.String name)
Return true if an object with the specified name appears in the list. |
int |
getActiveIndex()
Returns the index of the active object |
java.lang.Object |
getActiveObject()
Returns the active object. |
java.lang.String |
getActiveObjectName()
Gets the name of the active object by calling its toString() method. |
java.lang.Object |
getObjectAt(int i)
Returns the object at position i from the list. |
java.lang.String |
getObjectName(int i)
Returns the name of the object at position i of the list. |
int |
getSize()
Returns the number of elements in the ActiveList. |
java.lang.Object |
nextObject()
Returns the next object in the current list, wrapping around in the overflow case. |
java.lang.Object |
previousObject()
Returns the previous object in the current list, wrapping around in the underflow case. |
void |
printObjects()
Prints out the names of all the objects and indicates which one is active. |
void |
removeActiveObject()
Remove the active object from the list. |
java.lang.Object |
setActiveObject(int i)
Sets the object at index i to be the active object. |
java.lang.Object |
setActiveObjectByName(java.lang.String name)
Sets the object identified by name to be the active object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ActiveList()
public ActiveList(java.lang.Object obj)
obj
- the object to add to the listMethod Detail |
public int getSize()
public java.lang.Object getActiveObject() throws java.lang.NoSuchFieldException
public int getActiveIndex()
public java.lang.Object setActiveObject(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- the index of the objectpublic boolean containsObjectName(java.lang.String name)
name
- the name of the objectpublic java.lang.Object setActiveObjectByName(java.lang.String name) throws java.lang.NoSuchFieldException
name
- the object namepublic void removeActiveObject() throws java.lang.NoSuchFieldException
public java.lang.String getActiveObjectName() throws java.lang.NoSuchFieldException
public void addActiveObject(java.lang.Object obj)
obj
- the object to addpublic void addObject(java.lang.Object obj) throws java.lang.NullPointerException
public java.lang.Object getObjectAt(int i)
i
- the object indexpublic java.lang.String getObjectName(int i)
i
- the index of the objectpublic java.lang.Object nextObject() throws java.lang.NoSuchFieldException
public java.lang.Object previousObject() throws java.lang.NoSuchFieldException
public void printObjects()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |