|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.ArrayList wyvern.lib.properties.ItemList
This class allows a wyvern.lib.Bag implementation to serialize its contents to & from a map file.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
ItemList()
|
Method Summary | |
java.lang.Object |
createClone()
Produces a clone of the property for the caller. |
boolean |
equals(java.lang.Object o)
Returns true if the passed ItemList equals this one. |
GameObject |
getParent()
Returns the parent (usually a bag or inventory). |
void |
readData(org.w3c.dom.Node bean)
Tells the object to parse its externalized representation from a list of lines. |
void |
setParent(GameObject parent)
Sets the parent container. |
boolean |
shouldWrite()
Returns true if we should write the object at all. |
protected boolean |
skipUniqueItem(GameObject obj)
Returns true if we should skip this item because it's unique, and being carried by a player. |
java.lang.String |
toString()
Returns a String representation of this list. |
java.util.List |
writeData()
Writes a list of items (game objects) to the file. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Constructor Detail |
public ItemList()
Method Detail |
public GameObject getParent()
public void setParent(GameObject parent)
public void readData(org.w3c.dom.Node bean) throws java.lang.Exception
readData
in interface SelfExternalizable
bean
- the DOM Node representing the bean
java.lang.Exception
public java.util.List writeData() throws java.lang.Exception
writeData
in interface SelfExternalizable
java.lang.Exception
public boolean shouldWrite()
shouldWrite
in interface SelfExternalizable
protected boolean skipUniqueItem(GameObject obj)
public java.lang.String toString()
public boolean equals(java.lang.Object o)
equals
in interface java.util.List
o
- the ItemList to compare to
public java.lang.Object createClone()
createClone
in interface MutableProperty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |