|
From: <nu...@us...> - 2011-05-30 11:56:43
|
Revision: 15068
http://pcgen.svn.sourceforge.net/pcgen/?rev=15068&view=rev
Author: nuance
Date: 2011-05-30 11:56:35 +0000 (Mon, 30 May 2011)
Log Message:
-----------
CheckStyle updates.
Modified Paths:
--------------
Trunk/pcgen/code/src/java/pcgen/cdom/base/Constants.java
Trunk/pcgen/code/src/java/plugin/bonustokens/ACValue.java
Trunk/pcgen/code/src/java/plugin/bonustokens/CasterLevel.java
Trunk/pcgen/code/src/java/plugin/bonustokens/Concentration.java
Trunk/pcgen/code/src/java/plugin/bonustokens/DR.java
Trunk/pcgen/code/src/java/plugin/bonustokens/Feat.java
Trunk/pcgen/code/src/java/plugin/bonustokens/Followers.java
Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCapacity.java
Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCost.java
Trunk/pcgen/code/src/java/plugin/bonustokens/ItemWeight.java
Trunk/pcgen/code/src/java/plugin/bonustokens/MonNonSkillHD.java
Trunk/pcgen/code/src/java/plugin/bonustokens/PCLevel.java
Trunk/pcgen/code/src/java/plugin/bonustokens/PPCost.java
Trunk/pcgen/code/src/java/plugin/bonustokens/PointBuy.java
Trunk/pcgen/code/src/java/plugin/bonustokens/SkillPool.java
Trunk/pcgen/code/src/java/plugin/bonustokens/SkillRank.java
Trunk/pcgen/code/src/java/plugin/bonustokens/WieldCategory.java
Modified: Trunk/pcgen/code/src/java/pcgen/cdom/base/Constants.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/cdom/base/Constants.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/pcgen/cdom/base/Constants.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -508,6 +508,9 @@
String LST_EXCLUSIVE = "EXCLUSIVE";
/** A snippet of List code as a constant. */
+ String LST_LEVEL = "LEVEL";
+
+ /** A snippet of List code as a constant. */
String LST_LIST = "LIST";
/** A snippet of List code as a constant. */
@@ -517,6 +520,9 @@
String LST_NONEXCLUSIVE = "NONEXCLUSIVE";
/** A snippet of List code as a constant. */
+ String LST_NUMBER = "NUMBER";
+
+ /** A snippet of List code as a constant. */
String LST_SCHOOL = "SCHOOL";
/** A snippet of List code as a constant. */
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/ACValue.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/ACValue.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/ACValue.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -29,12 +29,15 @@
import pcgen.rules.context.LoadContext;
/**
- * <code>ACValue</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:ACVALUE token.
*/
public final class ACValue extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
@@ -43,12 +46,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/CasterLevel.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/CasterLevel.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/CasterLevel.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,20 +25,24 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>CasterLevel</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:CASTERLEVEL token.
*/
public final class CasterLevel extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -50,12 +54,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/Concentration.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/Concentration.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/Concentration.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,20 +25,24 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>CasterLevel</code>
- *
- * @author Stefan Radermacher <za...@us...>
+ * Handles the BONUS:CONCENTRATION token.
*/
public final class Concentration extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -50,12 +54,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/DR.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/DR.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/DR.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -29,12 +29,15 @@
import pcgen.rules.context.LoadContext;
/**
- * <code>DR</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:DR token.
*/
public final class DR extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
@@ -43,12 +46,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/Feat.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/Feat.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/Feat.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -29,17 +29,20 @@
import pcgen.rules.context.LoadContext;
/**
- * <code>Feat</code>
- *
- * @author Devon Jones <sou...@ev...>
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:FEAT token.
*/
public final class Feat extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if ("POOL".equals(token) || "MONSTERPOOL".equals(token)
+ if ("POOL".equals(token)
+ || "MONSTERPOOL".equals(token)
|| "PCPOOL".equals(token))
{
addBonusInfo(token);
@@ -49,12 +52,22 @@
return false;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/Followers.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/Followers.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/Followers.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -1,3 +1,25 @@
+/*
+ * Followers.java
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Current Ver: $Revision$
+ * Last Editor: $Author: $
+ * Last Edited: $Date$
+ *
+ */
package plugin.bonustokens;
import pcgen.core.bonus.BonusObj;
@@ -3,13 +25,15 @@
import pcgen.rules.context.LoadContext;
+/**
+ * Handles the BONUS:FOLLOWERS token.
+ */
public class Followers extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
- public String getBonusHandled()
- {
- return "FOLLOWERS";
- }
-
- @Override
protected boolean parseToken(LoadContext context, final String argToken)
{
@@ -23,9 +47,26 @@
// return false;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
+ @Override
+ public String getBonusHandled()
+ {
+ return "FOLLOWERS";
+ }
+
}
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCapacity.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCapacity.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCapacity.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,20 +25,24 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>ItemCapacity</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:ITEMCAPACITY token.
*/
public final class ItemCapacity extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -50,12 +54,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCost.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCost.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/ItemCost.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -29,12 +29,15 @@
import pcgen.rules.context.LoadContext;
/**
- * <code>ItemCost</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:ITEMCOST token.
*/
public final class ItemCost extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
@@ -50,12 +53,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/ItemWeight.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/ItemWeight.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/ItemWeight.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,21 +25,25 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>ItemWeight</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:ITEMWEIGHT token.
*/
public final class ItemWeight extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -51,12 +55,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/MonNonSkillHD.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/MonNonSkillHD.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/MonNonSkillHD.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -42,18 +42,33 @@
{
private static final String[] bonusTags = {"NUMBER", "LOCKNUMBER"};
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
return "MONNONSKILLHD";
}
+ /**
+ * Get by index, an monster non-skill hit die attribute that may be bonused.
+ * @param tagNumber the index of the monster non-skill hit die attribute.
+ * @see pcgen.core.bonus.MultiTagBonusObj#getBonusTag(int)
+ * @return The monster non-skill hit die attribute.
+ */
@Override
protected String getBonusTag(final int tagNumber)
{
return bonusTags[tagNumber];
}
+ /**
+ * Get the number of monster non-skill hit die attributes that may be bonused.
+ * @see pcgen.core.bonus.MultiTagBonusObj#getBonusTag(int)
+ * @return The number of monster non-skill hit die attributes.
+ */
@Override
protected int getBonusTagLength()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/PCLevel.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/PCLevel.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/PCLevel.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,20 +25,24 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>PCLevel</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:PCLEVEL token.
*/
public final class PCLevel extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -50,12 +54,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/PPCost.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/PPCost.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/PPCost.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,20 +25,24 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>PPCost</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:PPCOST token.
*/
public final class PPCost extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -50,12 +54,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/PointBuy.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/PointBuy.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/PointBuy.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -29,12 +29,15 @@
import pcgen.rules.context.LoadContext;
/**
- * <code>PointBuy</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:POINTBUY token.
*/
public final class PointBuy extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
@@ -52,12 +55,22 @@
return false;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/SkillPool.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/SkillPool.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/SkillPool.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,28 +25,32 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>SkillPoints</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:SKILLPOOL token.
*/
public final class SkillPool extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("CLASS"))
+ if (token.startsWith(Constants.LST_CLASS))
{
addBonusInfo(token.replace('=', '.'));
}
- else if (token.startsWith("LEVEL"))
+ else if (token.startsWith(Constants.LST_LEVEL))
{
addBonusInfo(token.replace('=', '.'));
}
- else if ("NUMBER".equals(token))
+ else if (Constants.LST_NUMBER.equals(token))
{
addBonusInfo(token);
}
@@ -58,12 +62,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/SkillRank.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/SkillRank.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/SkillRank.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -25,20 +25,24 @@
*/
package plugin.bonustokens;
+import pcgen.cdom.base.Constants;
import pcgen.core.bonus.BonusObj;
import pcgen.rules.context.LoadContext;
/**
- * <code>SkillRank</code>
- *
- * @author Greg Bingleman <by...@ho...>
+ * Handles the BONUS:SKILLRANK token.
*/
public final class SkillRank extends BonusObj
{
+ /**
+ * Parse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#parseToken(LoadContext, java.lang.String)
+ * @return True if successfully parsed.
+ */
@Override
protected boolean parseToken(LoadContext context, final String token)
{
- if (token.startsWith("TYPE="))
+ if (token.startsWith(Constants.LST_TYPE_EQUAL))
{
addBonusInfo(token.replace('=', '.'));
}
@@ -50,12 +54,22 @@
return true;
}
+ /**
+ * Unparse the bonus token.
+ * @see pcgen.core.bonus.BonusObj#unparseToken(java.lang.Object)
+ * @param obj The object to unparse
+ * @return The unparsed string.
+ */
@Override
protected String unparseToken(final Object obj)
{
return (String) obj;
}
+ /**
+ * Return the bonus tag handled by this class.
+ * @return The bonus handled by this class.
+ */
@Override
public String getBonusHandled()
{
Modified: Trunk/pcgen/code/src/java/plugin/bonustokens/WieldCategory.java
===================================================================
--- Trunk/pcgen/code/src/java/plugin/bonustokens/WieldCategory.java 2011-05-30 10:53:43 UTC (rev 15067)
+++ Trunk/pcgen/code/src/java/plugin/bonustokens/WieldCategory.java 2011-05-30 11:56:35 UTC (rev 15068)
@@ -38,7 +38,7 @@
* Return the bonus tag handled by this class.
* @return The bonus handled by this class.
*/
- @Override
+ @Override
public String getBonusHandled()
{
return "WIELDCATEGORY";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|