Ray's recent war on Arrays makes it more interesting to accept general collections.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@1048 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Par Winzell
2011-01-10 17:26:43 +00:00
parent e92de1c460
commit 9d00a631e2
@@ -22,6 +22,7 @@
package com.threerings.stats.server.persist;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
@@ -133,6 +134,15 @@ public class StatRepository extends DepotRepository
* first loaded. Exceptions that occur while writing the stats will be caught and logged.
*/
public void writeModified (int playerId, Stat[] stats)
{
writeModified(playerId, Arrays.asList(stats));
}
/**
* Writes out any of the stats in the supplied iterable that have been modified since they were
* first loaded. Exceptions that occur while writing the stats will be caught and logged.
*/
public void writeModified (int playerId, Iterable<Stat> stats)
{
for (Stat stat : stats) {
try {