|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javawebparts.servlet.Items
This class holds the items from a configuration file. It is a simple list of String items. This class is used by the TextReturnerServlet and the ImageReturnerServlet.
Field Summary | |
private java.util.ArrayList |
items
Our actual list of items as read in from the file. |
private java.lang.String |
order
What order items are retrieved in. |
private static java.lang.String |
ORDER_FORWARD
Constant used when the order is "forward". |
private static java.lang.String |
ORDER_RANDOM
Constant used when the order is "random". |
private static java.lang.String |
ORDER_REVERSE
Constant used when the order is "reverse". |
private int[] |
orderArray
The array that will store the order to return the items in. |
private int |
orderArrayIndex
Current index into the orderArray array. |
Constructor Summary | |
Items()
|
Method Summary | |
java.lang.String |
getItem()
Returns the next item in the list. |
void |
setItem(java.lang.String item)
Adds an item to the collection. |
void |
setOrder(java.lang.String inOrder)
This method is called AFTER the items have been populated by Digester. |
java.lang.String |
toString()
Overriden toString method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String ORDER_RANDOM
private static final java.lang.String ORDER_FORWARD
private static final java.lang.String ORDER_REVERSE
private int[] orderArray
private int orderArrayIndex
private java.util.ArrayList items
private java.lang.String order
Constructor Detail |
public Items()
Method Detail |
public void setOrder(java.lang.String inOrder)
inOrder
- What the order will be ("random", "forward" or "reverse").public void setItem(java.lang.String item)
item
- The item to add.public java.lang.String getItem()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |