|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--NWNFiles.GFFFile.Structure
Constructor Summary | |
|
GFFFile.Structure(long _type,
GFFFile.Field[] fields)
Constructs a Structure object. |
protected |
GFFFile.Structure(long _type,
GFFFile _owner,
GFFFile.Field[] fields)
Constructs a Structure object. |
Method Summary | |
void |
addField(GFFFile.Field newField)
Adds a field to the structures. |
GFFFile.Field |
addField(long _type,
String _label,
Object _data)
Creates and adds a field to the structures. |
Object |
clone()
|
Object |
clone(GFFFile target)
Creates a copy of this object to be used in the given GFFFile. |
GFFFile.Field |
getField(int index)
REturns the index+1th field. |
GFFFile.Field |
getField(String label)
Returns the field whose label is label. |
int |
getFieldCount()
|
GFFFile |
getOwner()
|
long |
getType()
|
protected void |
setOwner(GFFFile _owner)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GFFFile.Structure(long _type, GFFFile.Field[] fields)
_type
- Type of the structure.fields
- A list of the field in the structure.protected GFFFile.Structure(long _type, GFFFile _owner, GFFFile.Field[] fields)
_type
- Type of the structure._owner
- The gff file to which belong the structure.fields
- A list of the field in the structure.Method Detail |
public void addField(GFFFile.Field newField)
newField
- The field to be added to the structure.public GFFFile.Field addField(long _type, String _label, Object _data) throws NameTooLong
_type
- The field type, see the FieldType
class for further information._label
- The field label._data
- The data contained by the field.
NameTooLong
- if the label is longer than 16 characters.public GFFFile.Field getField(int index)
index
- index of the field to be returned.
public GFFFile.Field getField(String label)
label
- the label of the field to be returned.
public int getFieldCount()
public GFFFile getOwner()
public long getType()
protected void setOwner(GFFFile _owner)
public String toString()
toString
in class Object
public Object clone()
clone
in class Object
public Object clone(GFFFile target)
target
- Target GFFFile.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |