# IntArrayStat (vilya 1.3 API)
Date: 2011-04-06

## com.threerings.stats.data
Class IntArrayStat

    java.lang.Object
      com.threerings.stats.data.Stat
          com.threerings.stats.data.IntArrayStat

All Implemented Interfaces:
  com.threerings.io.Streamable, com.threerings.presents.dobj.DSet.Entry, Cloneable

    public class IntArrayStat

extends Stat

Used to track an integer array statistic.

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
`com.threerings.io.Streamable.Closure`

Constructor Summary
`IntArrayStat()`

Method Summary
`void` `appendValue(int value)` Appends a value to this statistic.
`int[]` `getValue()` Returns the value of this statistic.
`void` `persistTo(com.threerings.io.ObjectOutputStream out, Stat.AuxDataSource aux)` Serializes this instance for storage in the item database.
`boolean` `setValue(int[] value)` Sets this statistic's value to the specified value.
`void` `unpersistFrom(com.threerings.io.ObjectInputStream in, Stat.AuxDataSource aux)` Unserializes this item from data obtained from the item database.
`String` `valueToString()` Derived statistics must override this method and render their value to a string.

Methods inherited from class com.threerings.stats.data.Stat
`clone, getCode, getKey, getModCount, getType, getType, initType, isModified, setModCount, setModified, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### IntArrayStat

    public IntArrayStat()

Method Detail

### getValue

    public int[] getValue()

  Returns the value of this statistic.

### setValue

    public boolean setValue(int[] value)

  Sets this statistic's value to the specified value.

  Returns:
    true if the stat was modified, false if not.

### appendValue

    public void appendValue(int value)

  Appends a value to this statistic.

### valueToString

    public String valueToString()

  Description copied from class: `Stat`
  Derived statistics must override this method and render their value to a string. Used by `Stat.toString()` and to display the value in game.

  Specified by:
    `valueToString` in class `Stat`

### persistTo

    public void persistTo(com.threerings.io.ObjectOutputStream out,
                          Stat.AuxDataSource aux)
                   throws IOException

  Description copied from class: `Stat`
  Serializes this instance for storage in the item database. Derived classes must override this method to implement persistence.

  Specified by:
    `persistTo` in class `Stat`
  Throws:
    `IOException`

### unpersistFrom

    public void unpersistFrom(com.threerings.io.ObjectInputStream in,
                              Stat.AuxDataSource aux)
                       throws IOException,
                              ClassNotFoundException

  Description copied from class: `Stat`
  Unserializes this item from data obtained from the item database. Derived classes must override this method to implement persistence.

  Specified by:
    `unpersistFrom` in class `Stat`
  Throws:
    `IOException`
    `ClassNotFoundException`

Copyright © 2011. All Rights Reserved.