Use the samskivert Predicate.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@39 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2006-08-28 18:39:13 +00:00
parent af2f554940
commit bb05bd3f3f
2 changed files with 8 additions and 16 deletions
@@ -33,11 +33,9 @@ import java.util.Iterator;
import com.samskivert.util.HashIntMap;
import com.samskivert.util.IntIntMap;
import com.samskivert.util.Predicate;
import com.samskivert.util.Tuple;
import org.apache.commons.collections.iterators.FilterIterator;
import org.apache.commons.collections.Predicate;
import com.threerings.resource.ResourceBundle;
import com.threerings.resource.ResourceManager;
@@ -219,14 +217,14 @@ public class BundledComponentRepository
// documentation inherited
public Iterator enumerateComponentIds (final ComponentClass compClass)
{
Predicate classP = new Predicate() {
public boolean evaluate (Object input) {
Predicate<Integer> pred = new Predicate<Integer>() {
public boolean isMatch (Integer input) {
CharacterComponent comp = (CharacterComponent)
_components.get(input);
return comp.componentClass.equals(compClass);
}
};
return new FilterIterator(_components.keySet().iterator(), classP);
return pred.filter(_components.keySet().iterator());
}
/**