From d6c55a091f96e920418177ff4cb7be1bb2bdfba9 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 4 Aug 2008 12:59:43 +0000 Subject: [PATCH] Again, always on the variable, not the method. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@703 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/java/com/threerings/stats/data/StatSet.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/stats/data/StatSet.java b/src/java/com/threerings/stats/data/StatSet.java index dfa72573..bf3bd201 100644 --- a/src/java/com/threerings/stats/data/StatSet.java +++ b/src/java/com/threerings/stats/data/StatSet.java @@ -159,10 +159,9 @@ public final class StatSet extends DSet * @exception ClassCastException thrown if the registered type of the specified stat is not * an {@link SetStat} parameterized on the given type. */ - @SuppressWarnings("unchecked") public void addToSetStat (Stat.Type type, T value) { - SetStat stat = (SetStat)getStat(type); + @SuppressWarnings("unchecked") SetStat stat = (SetStat)getStat(type); if (stat == null) { stat = (SetStat)type.newStat(); stat.add(value); @@ -233,10 +232,9 @@ public final class StatSet extends DSet * @exception ClassCastException thrown if the registered type of the specified stat is not an * {@link SetStat}. */ - @SuppressWarnings("unchecked") public int getSetStatSize (Stat.Type type) { - SetStat stat = (SetStat)getStat(type); + @SuppressWarnings("unchecked") SetStat stat = (SetStat)getStat(type); return (stat == null ? 0 : stat.size()); } @@ -244,10 +242,9 @@ public final class StatSet extends DSet * Returns true if the specified {@link SetStat} contains the specified value, false * otherwise. */ - @SuppressWarnings("unchecked") public boolean containsValue (Stat.Type type, T value) { - SetStat stat = (SetStat)getStat(type); + @SuppressWarnings("unchecked") SetStat stat = (SetStat)getStat(type); return (stat == null) ? false : stat.contains(value); }