vooga.engine.overlay
Class Stat<T>

java.lang.Object
  extended by vooga.engine.overlay.Stat<T>

public class Stat<T>
extends java.lang.Object

Generic Stat class, can be of any non primitive type. toString() on object will be called when it is displayed getStat() will be called when it is time to display the stat in order to change the stat call setStat(T i)

<p>Stat<String> stat = new Stat<String>("Hello");</p> <p>stat.setStat("World");</p>


Constructor Summary
Stat(T i)
          Creates generic stat tracker object
 
Method Summary
 T getStat()
           
 void reset()
          Resets the stat to the initial value.
 void setStat(T i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stat

public Stat(T i)
Creates generic stat tracker object

Parameters:
i - can be any Object
Method Detail

getStat

public T getStat()

setStat

public void setStat(T i)

reset

public void reset()
Resets the stat to the initial value.