games.strategy.engine.stats
Class AbstractStat

java.lang.Object
  extended by games.strategy.engine.stats.AbstractStat
All Implemented Interfaces:
IStat

public abstract class AbstractStat
extends java.lang.Object
implements IStat

Returns an intelligent formatter, and returns value for alliances by summing our value for all players in the alliance.

Author:
Sean Bridges

Field Summary
protected static java.text.DecimalFormat DECIMAL_FORMAT
           
 
Constructor Summary
AbstractStat()
           
 
Method Summary
 java.text.NumberFormat getFormatter()
           
 double getValue(java.lang.String alliance, GameData data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface games.strategy.engine.stats.IStat
getName, getValue
 

Field Detail

DECIMAL_FORMAT

protected static final java.text.DecimalFormat DECIMAL_FORMAT
Constructor Detail

AbstractStat

public AbstractStat()
Method Detail

getValue

public double getValue(java.lang.String alliance,
                       GameData data)
Specified by:
getValue in interface IStat

getFormatter

public java.text.NumberFormat getFormatter()
Specified by:
getFormatter in interface IStat