From: Hendrik <nh...@us...> - 2007-11-20 18:33:00
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/npc/condition In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv27341/src/games/stendhal/server/entity/npc/condition Modified Files: KilledCondition.java Log Message: use tree set instead of list so that it commutes. Index: KilledCondition.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/npc/condition/KilledCondition.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KilledCondition.java 14 Nov 2007 22:49:16 -0000 1.2 --- KilledCondition.java 20 Nov 2007 18:32:57 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- import java.util.Arrays; import java.util.List; + import java.util.Set; + import java.util.TreeSet; import org.apache.commons.lang.builder.EqualsBuilder; *************** *** 17,21 **** */ public class KilledCondition extends ChatCondition { ! private List<String> toKill; /** --- 19,23 ---- */ public class KilledCondition extends ChatCondition { ! private Set<String> toKill; /** *************** *** 25,29 **** */ public KilledCondition(List<String> toKill) { ! this.toKill = toKill; } --- 27,31 ---- */ public KilledCondition(List<String> toKill) { ! this.toKill = new TreeSet(toKill); } *************** *** 34,38 **** */ public KilledCondition(String... toKill) { ! this.toKill = Arrays.asList(toKill); } --- 36,40 ---- */ public KilledCondition(String... toKill) { ! this.toKill = new TreeSet(Arrays.asList(toKill)); } |