com.planet_ink.coffee_mud.Common
Class DefaultClanPosition

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultClanPosition
All Implemented Interfaces:
ClanPosition, CMCommon, CMObject, Modifiable, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultClanPosition
extends java.lang.Object
implements ClanPosition


Field Summary
protected  Clan.Authority[] functionChart
          a chart of whether this position can perform the indexed function in this government
protected  java.lang.String ID
          the named ID of the position
protected  java.lang.String innerMaskStr
          the internal zapper mask for internal requirements to this position
protected  boolean isPublic
          the internal zapper mask for internal requirements to this position
protected  int max
          the maximum number of members that can hold this position
protected  java.lang.String name
          the name of the position within this government
protected  java.lang.String pluralName
          the plural name of the position within this government
protected  int rank
          the ordered rank of the position
protected  int roleID
          the named ID of the position
 
Constructor Summary
DefaultClanPosition()
           
 
Method Summary
 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.
 Clan.Authority[] getFunctionChart()
          Gets the function chart.
 java.lang.String getID()
          Gets the iD.
 java.lang.String getInnerMaskStr()
          Gets the inner mask str.
 int getMax()
          Gets the max.
 java.lang.String getName()
          Gets the name.
 java.lang.String getPluralName()
          Gets the plural name.
 int getRank()
          Gets the rank.
 int getRoleID()
          Gets the role id.
 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 isPublic()
          Checks if is public.
 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()
          return a new instance of the object
 void setFunctionChart(Clan.Authority[] functionChart)
          Sets the function chart.
 void setID(java.lang.String iD)
          Sets the iD.
 void setInnerMaskStr(java.lang.String innerMaskStr)
          Sets the inner mask str.
 void setMax(int max)
          Sets the max.
 void setName(java.lang.String name)
          Sets the name.
 void setPluralName(java.lang.String pluralName)
          Sets the plural name.
 void setPublic(boolean isPublic)
          Sets the public.
 void setRank(int rank)
          Sets the rank.
 void setRoleID(int roleID)
          Sets the role id.
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

protected java.lang.String ID
the named ID of the position


roleID

protected int roleID
the named ID of the position


rank

protected int rank
the ordered rank of the position


name

protected java.lang.String name
the name of the position within this government


pluralName

protected java.lang.String pluralName
the plural name of the position within this government


max

protected int max
the maximum number of members that can hold this position


innerMaskStr

protected java.lang.String innerMaskStr
the internal zapper mask for internal requirements to this position


isPublic

protected boolean isPublic
the internal zapper mask for internal requirements to this position


functionChart

protected Clan.Authority[] functionChart
a chart of whether this position can perform the indexed function in this government

Constructor Detail

DefaultClanPosition

public DefaultClanPosition()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

name

public java.lang.String name()
Description copied from interface: CMObject
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface CMObject
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

newInstance

public CMObject newInstance()
return a new instance of the object

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

getID

public java.lang.String getID()
Description copied from interface: ClanPosition
Gets the iD.

Specified by:
getID in interface ClanPosition
Returns:
the iD
See Also:
ClanPosition.setID(String)

setID

public void setID(java.lang.String iD)
Description copied from interface: ClanPosition
Sets the iD.

Specified by:
setID in interface ClanPosition
Parameters:
iD - the new iD
See Also:
ClanPosition.getID()

getRoleID

public int getRoleID()
Description copied from interface: ClanPosition
Gets the role id.

Specified by:
getRoleID in interface ClanPosition
Returns:
the role id
See Also:
ClanPosition.setRoleID(int)

setRoleID

public void setRoleID(int roleID)
Description copied from interface: ClanPosition
Sets the role id.

Specified by:
setRoleID in interface ClanPosition
Parameters:
roleID - the new role id
See Also:
ClanPosition.getRoleID()

getRank

public int getRank()
Description copied from interface: ClanPosition
Gets the rank.

Specified by:
getRank in interface ClanPosition
Returns:
the rank
See Also:
ClanPosition.setRank(int)

setRank

public void setRank(int rank)
Description copied from interface: ClanPosition
Sets the rank.

Specified by:
setRank in interface ClanPosition
Parameters:
rank - the new rank
See Also:
ClanPosition.getRank()

getName

public java.lang.String getName()
Description copied from interface: ClanPosition
Gets the name.

Specified by:
getName in interface ClanPosition
Returns:
the name
See Also:
ClanPosition.setName(String)

setName

public void setName(java.lang.String name)
Description copied from interface: ClanPosition
Sets the name.

Specified by:
setName in interface ClanPosition
Parameters:
name - the new name
See Also:
ClanPosition.getName()

getPluralName

public java.lang.String getPluralName()
Description copied from interface: ClanPosition
Gets the plural name.

Specified by:
getPluralName in interface ClanPosition
Returns:
the plural name
See Also:
ClanPosition.setPluralName(String)

setPluralName

public void setPluralName(java.lang.String pluralName)
Description copied from interface: ClanPosition
Sets the plural name.

Specified by:
setPluralName in interface ClanPosition
Parameters:
pluralName - the new plural name
See Also:
ClanPosition.getPluralName()

getMax

public int getMax()
Description copied from interface: ClanPosition
Gets the max.

Specified by:
getMax in interface ClanPosition
Returns:
the max
See Also:
ClanPosition.setMax(int)

setMax

public void setMax(int max)
Description copied from interface: ClanPosition
Sets the max.

Specified by:
setMax in interface ClanPosition
Parameters:
max - the new max
See Also:
ClanPosition.getMax()

getInnerMaskStr

public java.lang.String getInnerMaskStr()
Description copied from interface: ClanPosition
Gets the inner mask str.

Specified by:
getInnerMaskStr in interface ClanPosition
Returns:
the inner mask str
See Also:
ClanPosition.setInnerMaskStr(String)

setInnerMaskStr

public void setInnerMaskStr(java.lang.String innerMaskStr)
Description copied from interface: ClanPosition
Sets the inner mask str.

Specified by:
setInnerMaskStr in interface ClanPosition
Parameters:
innerMaskStr - the new inner mask str
See Also:
ClanPosition.getInnerMaskStr()

isPublic

public boolean isPublic()
Description copied from interface: ClanPosition
Checks if is public.

Specified by:
isPublic in interface ClanPosition
Returns:
true, if is public
See Also:
ClanPosition.setPublic(boolean)

setPublic

public void setPublic(boolean isPublic)
Description copied from interface: ClanPosition
Sets the public.

Specified by:
setPublic in interface ClanPosition
Parameters:
isPublic - the new public
See Also:
ClanPosition.isPublic()

getFunctionChart

public Clan.Authority[] getFunctionChart()
Description copied from interface: ClanPosition
Gets the function chart.

Specified by:
getFunctionChart in interface ClanPosition
Returns:
the function chart
See Also:
ClanPosition.setFunctionChart(com.planet_ink.coffee_mud.Common.interfaces.Clan.Authority[])

setFunctionChart

public void setFunctionChart(Clan.Authority[] functionChart)
Description copied from interface: ClanPosition
Sets the function chart.

Specified by:
setFunctionChart in interface ClanPosition
Parameters:
functionChart - the new function chart
See Also:
ClanPosition.getFunctionChart()

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

getSaveStatIndex

public int getSaveStatIndex()
Description copied from interface: Modifiable
Returns the index into the stat codes array where extra savable fields begins. This number is always the same as getStatCodes().length unless there are extra fields which need to be saved in xml for generic objects. This method is used by editors for post-build user-defined fields.

Specified by:
getSaveStatIndex in interface Modifiable
Returns:
the index into getStatCodes()
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String), Modifiable.setStat(String, String)

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

isStat

public boolean isStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
isStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
true if the code is a real value, false otherwise
See Also:
Modifiable.getStatCodes()

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()

toString

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