CMCommon
, CMObject
, Modifiable
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
DefaultEnvironmental
public class DefaultModifiable extends java.lang.Object implements CMCommon, Modifiable
Modifier and Type | Field | Description |
---|---|---|
java.util.Map<java.lang.String,java.lang.String> |
fields |
idConverter
Constructor | Description |
---|---|
DefaultModifiable() |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(CMObject o) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
int |
getSaveStatIndex() |
Returns the index into the stat codes array where extra savable fields begins.
|
java.lang.String |
getStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
java.lang.String[] |
getStatCodes() |
Returns an array of the string names of those fields which are modifiable on this object at run-time by
builders.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
boolean |
isStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
java.lang.String |
name() |
The displayable name of this object.
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
void |
setStat(java.lang.String code,
java.lang.String val) |
An alternative means of setting the values of those fields on this object which are modifiable at
run-time by builders.
|
java.lang.String |
toString() |
public java.lang.String ID()
CMObject
public java.lang.String name()
CMObject
name
in interface CMObject
Environmental.Name()
public java.lang.String toString()
toString
in class java.lang.Object
public CMObject copyOf()
CMObject
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public int getSaveStatIndex()
Modifiable
getSaveStatIndex
in interface Modifiable
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
public boolean isStat(java.lang.String code)
Modifiable
isStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()