com.threerings.stats.data
Class SetStat<T>

java.lang.Object
  extended by com.threerings.stats.data.Stat
      extended by com.threerings.stats.data.SetStat<T>
All Implemented Interfaces:
Streamable, DSet.Entry, Cloneable
Direct Known Subclasses:
IntSetStat, StringSetStat

public abstract class SetStat<T>
extends Stat


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.stats.data.Stat
Stat.AuxDataSource, Stat.Type
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
 
Fields inherited from class com.threerings.stats.data.Stat
_codeToType, _crc, _modCount, _modified, _type
 
Constructor Summary
SetStat()
           
 
Method Summary
abstract  boolean add(T key)
          Adds the specified object to this set.
abstract  boolean contains(T key)
          Returns true if the specified object is contained in this set.
abstract  int size()
          Returns the number of elements in this set.
 
Methods inherited from class com.threerings.stats.data.Stat
clone, crc32, getCode, getKey, getModCount, getType, getType, initType, isModified, persistTo, setModCount, setModified, toString, unpersistFrom, valueToString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetStat

public SetStat()
Method Detail

size

public abstract int size()
Returns the number of elements in this set.


add

public abstract boolean add(T key)
Adds the specified object to this set.

Returns:
true if the object was newly added, false if it was already contained in the set.

contains

public abstract boolean contains(T key)
Returns true if the specified object is contained in this set.