|
From: <th...@us...> - 2007-09-30 21:17:36
|
Revision: 4197
http://pcgen.svn.sourceforge.net/pcgen/?rev=4197&view=rev
Author: thpr
Date: 2007-09-30 14:17:39 -0700 (Sun, 30 Sep 2007)
Log Message:
-----------
Some planning items for EqMod Choose
Modified Paths:
--------------
branches/cdom/code/src/java/pcgen/core/EquipmentModifier.java
Modified: branches/cdom/code/src/java/pcgen/core/EquipmentModifier.java
===================================================================
--- branches/cdom/code/src/java/pcgen/core/EquipmentModifier.java 2007-09-30 20:56:23 UTC (rev 4196)
+++ branches/cdom/code/src/java/pcgen/core/EquipmentModifier.java 2007-09-30 21:17:39 UTC (rev 4197)
@@ -33,7 +33,9 @@
import java.util.Set;
import java.util.StringTokenizer;
+import pcgen.cdom.content.ChooseActionContainer;
import pcgen.cdom.enumeration.IntegerKey;
+import pcgen.cdom.helper.ChoiceSet;
import pcgen.core.bonus.Bonus;
import pcgen.core.bonus.BonusObj;
import pcgen.core.prereq.Prerequisite;
@@ -1656,4 +1658,67 @@
return getKeyName().compareTo(o.toString());
}
+
+ private EqModChooseActionContainer chooseContainer = null;
+
+ @Override
+ public boolean hasChooseContainer()
+ {
+ return chooseContainer == null;
+ }
+
+ @Override
+ public EqModChooseActionContainer getChooseContainer()
+ {
+ if (chooseContainer == null)
+ {
+ chooseContainer = new EqModChooseActionContainer("CHOOSE");
+ }
+ return chooseContainer;
+ }
+
+ public class EqModChooseActionContainer extends ChooseActionContainer
+ {
+
+ private ChoiceSet<?> secondChoiceSet;
+
+ public EqModChooseActionContainer(String nm)
+ {
+ super(nm);
+ }
+
+ public ChoiceSet<?> getSecondChoiceSet()
+ {
+ return secondChoiceSet;
+ }
+
+ public void setSecondChoiceSet(ChoiceSet<?> secondChoiceSet)
+ {
+ this.secondChoiceSet = secondChoiceSet;
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (o instanceof EqModChooseActionContainer && super.equals(o))
+ {
+ EqModChooseActionContainer other = (EqModChooseActionContainer) o;
+ if (secondChoiceSet == null)
+ {
+ if (other.secondChoiceSet != null)
+ {
+ return false;
+ }
+ }
+ else if (!secondChoiceSet.equals(other.secondChoiceSet))
+ {
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|