nwnintf.format.mod
Class ResRef

java.lang.Object
  |
  +--nwnintf.format.mod.ResRef

public class ResRef
extends java.lang.Object

Encapsulate a ResRef in a module.


Field Summary
static int tiDLG
           
static int tiGFF
           
static int tiGIT
           
static int tiNCS
           
static int tiNSS
           
static int tiPTT
           
static int tiSEZ
           
static int tiUTC
           
static int tiUTD
           
static int tiUTE
           
static int tiUTI
           
static int tiUTM
           
static int tiUTP
           
static int tiUTS
           
static int tiUTT
           
static int tiUTW
           
static java.lang.String tsDLG
           
static java.lang.String tsGFF
           
static java.lang.String tsGIT
           
static java.lang.String tsNCS
           
static java.lang.String tsNSS
           
static java.lang.String tsPTT
           
static java.lang.String tsSEZ
           
static java.lang.String tsUTC
           
static java.lang.String tsUTD
           
static java.lang.String tsUTE
           
static java.lang.String tsUTI
           
static java.lang.String tsUTM
           
static java.lang.String tsUTP
           
static java.lang.String tsUTS
           
static java.lang.String tsUTT
           
static java.lang.String tsUTW
           
 
Constructor Summary
ResRef()
          No-argument constructor, for serialization.
ResRef(ResRef resref)
          Copy constructor.
ResRef(ResRef resref, int type)
          Copy constructor, changing type.
ResRef(java.lang.String basename, int type)
           
ResRef(java.lang.String basename, java.lang.String type)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String filename()
          This resref as a filename in dotted-pair format, e.g.
 java.lang.String getBasename()
           
 int getType()
          This method exists for serialization.
 int hashCode()
           
 java.lang.String name()
           
static ResRef parseFilename(java.lang.String nametype)
           
 void setBasename(java.lang.String basename)
           
 void setType(int type)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 int typeInt()
          Type of this resref as an int
static int typeInt(java.lang.String type)
          The integer type code for this string type.
 java.lang.String typeStr()
          Type of this resref as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tsNSS

public static java.lang.String tsNSS

tiNSS

public static int tiNSS

tsNCS

public static java.lang.String tsNCS

tiNCS

public static int tiNCS

tsSEZ

public static java.lang.String tsSEZ

tiSEZ

public static int tiSEZ

tsUTC

public static java.lang.String tsUTC

tiUTC

public static int tiUTC

tsUTD

public static java.lang.String tsUTD

tiUTD

public static int tiUTD

tsUTE

public static java.lang.String tsUTE

tiUTE

public static int tiUTE

tsUTI

public static java.lang.String tsUTI

tiUTI

public static int tiUTI

tsUTM

public static java.lang.String tsUTM

tiUTM

public static int tiUTM

tsUTP

public static java.lang.String tsUTP

tiUTP

public static int tiUTP

tsUTS

public static java.lang.String tsUTS

tiUTS

public static int tiUTS

tsUTT

public static java.lang.String tsUTT

tiUTT

public static int tiUTT

tsUTW

public static java.lang.String tsUTW

tiUTW

public static int tiUTW

tsGIT

public static java.lang.String tsGIT

tiGIT

public static int tiGIT

tsGFF

public static java.lang.String tsGFF

tiGFF

public static int tiGFF

tsPTT

public static java.lang.String tsPTT

tiPTT

public static int tiPTT

tsDLG

public static java.lang.String tsDLG

tiDLG

public static int tiDLG
Constructor Detail

ResRef

public ResRef()
No-argument constructor, for serialization.


ResRef

public ResRef(java.lang.String basename,
              int type)
Parameters:
basename - The base name of the resref, e.g. "amauna"
type - The type of the resref as an int. Use -1 for undefined type.

ResRef

public ResRef(java.lang.String basename,
              java.lang.String type)
Parameters:
basename - The base name of the resref, e.g. "amauna".
type - The type as a string, e.g. "utc", or as a number.

ResRef

public ResRef(ResRef resref)
Copy constructor.


ResRef

public ResRef(ResRef resref,
              int type)
Copy constructor, changing type.

Method Detail

parseFilename

public static ResRef parseFilename(java.lang.String nametype)
Parameters:
nametype - A dotted-pair resref e.g. "amauna.utc".

typeInt

public static int typeInt(java.lang.String type)
The integer type code for this string type.


typeStr

public java.lang.String typeStr()
Type of this resref as a string. Null if undefined.


typeInt

public int typeInt()
Type of this resref as an int. -1 if undefined.


filename

public java.lang.String filename()
This resref as a filename in dotted-pair format, e.g. "monkey.utc" Will throw if type is undefined.


setBasename

public void setBasename(java.lang.String basename)

getBasename

public java.lang.String getBasename()

getType

public int getType()
This method exists for serialization.

See Also:
java.beans.XMLEncoder

setType

public void setType(int type)

setType

public void setType(java.lang.String type)

name

public java.lang.String name()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object