public class StringStat extends Stat<java.lang.String>
definition, FORMAT
Constructor and Description |
---|
StringStat(StatGroup group,
StatDefinition definition) |
StringStat(StatGroup group,
StatDefinition definition,
java.lang.String initialValue) |
Modifier and Type | Method and Description |
---|---|
void |
add(Stat<java.lang.String> otherStat)
Add the value of "other" to this stat.
|
void |
clear()
Initialize the stat to the proper value at startup, or reset the
stat when copyAndClear() is called.
|
java.lang.String |
get() |
protected java.lang.String |
getFormattedValue()
Return a string with the stat value formatted as appropriate for
its type.
|
boolean |
isNotSet()
Returns true if this stat is zero or null, as is appropriate for its
type.
|
void |
set(java.lang.String newValue)
Set the stat value.
|
copy, copyAndClear, getDefinition, toString, toStringVerbose
public StringStat(StatGroup group, StatDefinition definition)
public StringStat(StatGroup group, StatDefinition definition, java.lang.String initialValue)
public java.lang.String get()
public void set(java.lang.String newValue)
Stat
public void add(Stat<java.lang.String> otherStat)
Stat
public void clear()
Stat
protected java.lang.String getFormattedValue()
Stat
getFormattedValue
in class Stat<java.lang.String>
Copyright (c) 2004-2012 Oracle. All rights reserved.