From 48f501a2baf80a2cc19590cb23d99d14ce024e08 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 27 May 2009 17:50:55 +0000 Subject: [PATCH] Switch to google's Predicate. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@841 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/java/com/threerings/parlor/card/client/CardPanel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/parlor/card/client/CardPanel.java b/src/java/com/threerings/parlor/card/client/CardPanel.java index efec2ae6..21ebc63f 100644 --- a/src/java/com/threerings/parlor/card/client/CardPanel.java +++ b/src/java/com/threerings/parlor/card/client/CardPanel.java @@ -34,10 +34,10 @@ import java.awt.event.MouseEvent; import javax.swing.event.MouseInputAdapter; +import com.google.common.base.Predicate; import com.google.common.collect.Lists; import com.samskivert.util.ObserverList; -import com.samskivert.util.Predicate; import com.samskivert.util.QuickSort; import com.threerings.media.FrameManager; @@ -745,7 +745,7 @@ public abstract class CardPanel extends VirtualMediaPanel protected boolean isSelectable (CardSprite sprite) { return _handSelectionMode != NONE && - (_handSelectionPredicate == null || _handSelectionPredicate.isMatch(sprite)); + (_handSelectionPredicate == null || _handSelectionPredicate.apply(sprite)); } /** @@ -761,7 +761,7 @@ public abstract class CardPanel extends VirtualMediaPanel // otherwise, look for a sprite that fits the predicate and isn't the parameter for (CardSprite cs : _handSprites) { - if (cs != sprite && _handSelectionPredicate.isMatch(cs)) { + if (cs != sprite && _handSelectionPredicate.apply(cs)) { return false; } }