monrovia.protocol
Class Stat

java.lang.Object
  |
  +--monrovia.protocol.Stat

public class Stat
extends java.lang.Object

The Stat class is used for sending stats to the client


Field Summary
 int mIntValue
          the int
 boolean mIsIntStat
          if mIsIntStat is true this Stat contains an int otherwise its a string
 java.lang.String mName
          the name of this stat
 java.lang.String mStrValue
          the string
 
Constructor Summary
Stat(java.lang.String pName, int pValue)
          Constructor for an int stat
Stat(java.lang.String pName, java.lang.String pValue)
          Constructor for a string stat
 
Method Summary
 java.lang.String getStatName()
          Get stat name.
 java.lang.String getStringValue()
          Get stat value.
 void setStatValue(int pValue)
          Set int stat value.
 void setStatValue(java.lang.String pValue)
          Set string stat value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mIsIntStat

public boolean mIsIntStat
if mIsIntStat is true this Stat contains an int otherwise its a string

mStrValue

public java.lang.String mStrValue
the string

mIntValue

public int mIntValue
the int

mName

public java.lang.String mName
the name of this stat
Constructor Detail

Stat

public Stat(java.lang.String pName,
            int pValue)
Constructor for an int stat
Parameters:
pName - the name of the stat
pValue - the value of the stat

Stat

public Stat(java.lang.String pName,
            java.lang.String pValue)
Constructor for a string stat
Parameters:
pName - the name of the stat
pValue - the value of the stat
Method Detail

getStatName

public java.lang.String getStatName()
Get stat name.
Returns:
stat name as string

getStringValue

public java.lang.String getStringValue()
Get stat value.
Returns:
stat value as string

setStatValue

public void setStatValue(java.lang.String pValue)
Set string stat value.
Parameters:
pValue - stat value as string

setStatValue

public void setStatValue(int pValue)
Set int stat value.
Parameters:
pValue - stat value as int