Code hygiene. Not as pedantic as I'd like, but I couldn't resist the huge time

saver that is Eclipse's "Infer generic types" which leaves HashMap and
ArrayList as the declared type where I would normally prefer to change those to
Map and List and use Maps and Lists to instantiate them.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@593 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2008-08-01 15:56:37 +00:00
parent 60622c3590
commit 659f5bc5e2
64 changed files with 393 additions and 388 deletions
@@ -24,6 +24,7 @@ package com.threerings.cast.bundle;
import java.awt.Component;
import java.util.Iterator;
import com.threerings.cast.ComponentClass;
import com.threerings.media.image.ClientImageManager;
import com.threerings.resource.ResourceManager;
@@ -57,7 +58,7 @@ public class BundledComponentRepositoryTest extends TestCase
// System.out.println("Action sets: " + StringUtil.toString(
// repo._actionSets.values().iterator()));
Iterator iter = repo.enumerateComponentClasses();
Iterator<ComponentClass> iter = repo.enumerateComponentClasses();
while (iter.hasNext()) {
// ComponentClass cclass = (ComponentClass)
iter.next();
@@ -25,6 +25,7 @@ import java.awt.Component;
import java.util.Iterator;
import com.threerings.media.image.ClientImageManager;
import com.threerings.media.tile.TileSet;
import com.threerings.resource.ResourceManager;
import junit.framework.Test;
@@ -46,7 +47,7 @@ public class BundledTileSetRepositoryTest extends TestCase
null, "config/resource/manager.properties", null);
BundledTileSetRepository repo = new BundledTileSetRepository(
rmgr, new ClientImageManager(rmgr, (Component)null), "tilesets");
Iterator sets = repo.enumerateTileSets();
Iterator<TileSet> sets = repo.enumerateTileSets();
while (sets.hasNext()) {
sets.next();
// System.out.println(sets.next());
@@ -25,6 +25,8 @@ import java.io.IOException;
import java.util.Iterator;
import java.util.HashMap;
import com.threerings.media.tile.TileSet;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -38,7 +40,7 @@ public class XMLTileSetParserTest extends TestCase
@Override
public void runTest ()
{
HashMap sets = new HashMap();
HashMap<String, TileSet> sets = new HashMap<String, TileSet>();
XMLTileSetParser parser = new XMLTileSetParser();
// add some rulesets
@@ -51,7 +53,7 @@ public class XMLTileSetParserTest extends TestCase
parser.loadTileSets(TILESET_PATH, sets);
// print them out
Iterator iter = sets.values().iterator();
Iterator<TileSet> iter = sets.values().iterator();
while (iter.hasNext()) {
iter.next();
// System.out.println(iter.next());
@@ -49,10 +49,10 @@ public class ScrollingScene extends MisoSceneModel
{
// locate the water tileset
TileSetRepository tsrepo = ctx.getTileManager().getTileSetRepository();
Iterator iter = tsrepo.enumerateTileSets();
Iterator<TileSet> iter = tsrepo.enumerateTileSets();
String tsname = null;
while (iter.hasNext()) {
TileSet tset = (TileSet)iter.next();
TileSet tset = iter.next();
// yay for built-in regex support!
if (tset.getName().matches(".*[Ww]ater.*") &&
tset instanceof BaseTileSet) {