|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrlgamekit.item.AbstractItem
public class AbstractItem
A read only data container for generic item data.
Check http://www.funkelwerk.de/forum/index.php?topic=341.0 for more details on the design ideas behind this class
IndividualItem| Constructor Summary | |
|---|---|
AbstractItem(ItemConfiguration config,
java.io.BufferedReader reader)
Create a new abstratc item fromm the data accessed through the reader. |
|
AbstractItem(ItemConfiguration config,
java.lang.String key)
Create a new, empty abstract item. |
|
AbstractItem(ItemConfiguration config,
java.lang.String key,
java.lang.String[] sval,
int[] ival,
Triplet[] tval)
Create a new abstract item from the data sets. |
|
| Method Summary | |
|---|---|
int |
getInt(int index)
Access integer data through index |
java.lang.String |
getKey()
Unique key (within an item catalog) for this item data |
java.lang.String |
getString(int index)
Access string data through index |
Triplet |
getTriplet(int index)
Access triplet data through index |
java.lang.String |
toString()
|
void |
write(java.io.Writer writer)
Write the item data through the given writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractItem(ItemConfiguration config,
java.io.BufferedReader reader)
throws java.io.IOException
config - The item config to use to interpret the datareader - The reader to read the data
java.io.IOException - IOException will be thrown on read errors, including
data integrity check fails.
public AbstractItem(ItemConfiguration config,
java.lang.String key)
config - The item config to use to interpret the datakey - Must be unique within an item catalogItemCatalog
public AbstractItem(ItemConfiguration config,
java.lang.String key,
java.lang.String[] sval,
int[] ival,
Triplet[] tval)
config - The item config to use to interpret the datakey - Must be unique within an item catalogsval - String valuesival - Integer valuestval - triplet valuesItemCatalog| Method Detail |
|---|
public java.lang.String getKey()
public java.lang.String getString(int index)
public int getInt(int index)
public Triplet getTriplet(int index)
public void write(java.io.Writer writer)
throws java.io.IOException
writer - The writer to write to.
java.io.IOException - IOException is thrown if write errors occur.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 | ||||||||