A healthy splash of google-collections
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@822 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -34,6 +34,8 @@ import java.text.ParseException;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import com.samskivert.util.HashIntMap;
|
||||
import com.samskivert.util.RandomUtil;
|
||||
import com.samskivert.util.StringUtil;
|
||||
@@ -133,7 +135,7 @@ public class ColorPository implements Serializable
|
||||
{
|
||||
// figure out our starter ids if we haven't already
|
||||
if (_starters == null) {
|
||||
ArrayList<ColorRecord> list = new ArrayList<ColorRecord>();
|
||||
ArrayList<ColorRecord> list = Lists.newArrayList();
|
||||
for (ColorRecord color : colors.values()) {
|
||||
if (color.starter) {
|
||||
list.add(color);
|
||||
@@ -144,8 +146,8 @@ public class ColorPository implements Serializable
|
||||
|
||||
// sanity check
|
||||
if (_starters.length < 1) {
|
||||
log.warning("Requested random starting color from " +
|
||||
"colorless component class " + this + "].");
|
||||
log.warning("Requested random starting color from colorless component class",
|
||||
"class", this);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ import java.awt.Rectangle;
|
||||
import java.awt.Transparency;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import com.samskivert.util.LRUHashMap;
|
||||
import com.samskivert.util.StringUtil;
|
||||
@@ -477,7 +479,7 @@ public class ImageManager
|
||||
}
|
||||
|
||||
if (_colorized == null) {
|
||||
_colorized = new ArrayList<Tuple<Colorization[], BufferedImage>>();
|
||||
_colorized = Lists.newArrayList();
|
||||
}
|
||||
|
||||
// we search linearly through our list of colorized copies because it is not likely to
|
||||
@@ -540,7 +542,7 @@ public class ImageManager
|
||||
protected LRUHashMap<ImageKey, CacheRecord> _ccache;
|
||||
|
||||
/** The set of all keys we've ever seen. */
|
||||
protected HashSet<ImageKey> _keySet = new HashSet<ImageKey>();
|
||||
protected HashSet<ImageKey> _keySet = Sets.newHashSet();
|
||||
|
||||
/** Throttle our cache status logging to once every 300 seconds. */
|
||||
protected Throttle _cacheStatThrottle = new Throttle(1, 300000L);
|
||||
|
||||
Reference in New Issue
Block a user