[Megameknet-cvs] MegaMekNET/src/server/campaign/ranks VoteManager.java,1.1,1.2
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-09 09:47:59
|
Update of /cvsroot/megameknet/MegaMekNET/src/server/campaign/ranks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5552/src/server/campaign/ranks Modified Files: VoteManager.java Log Message: Cyclops changes and some minor corrections to the xml loading Index: VoteManager.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/ranks/VoteManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VoteManager.java 13 Mar 2005 10:43:29 -0000 1.1 --- VoteManager.java 9 Apr 2005 09:47:44 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- import java.util.ArrayList; + import java.util.Collections; import java.util.Hashtable; import java.util.List; *************** *** 51,59 **** public List getVotesFor(String name){ ! return (List)votees.get(name); } public List getVotesFrom(String name){ ! return (List)voters.get(name); } --- 52,62 ---- public List getVotesFor(String name){ ! return Collections.unmodifiableList( ! votees.contains(name) ? (List)votees.get(name) : new ArrayList()); } public List getVotesFrom(String name){ ! return Collections.unmodifiableList( ! voters.contains(name) ? (List)voters.get(name) : new ArrayList()); } *************** *** 66,70 **** result.add(v); } ! private void removeFromList(Hashtable h, String key, Vote v){ Object o = h.get(key); --- 69,73 ---- result.add(v); } ! private void removeFromList(Hashtable h, String key, Vote v){ Object o = h.get(key); |