Revision: 7811
Author: victormote
Date: 2006-07-22 15:07:57 -0700 (Sat, 22 Jul 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7811&view=rev
Log Message:
-----------
Implement standard use of "final" modifier on local variables and parameters.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtAngle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCharacter.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCountry.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtFrequency.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtKeep.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLanguage.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthBPIPDirection.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthConditional.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthRange.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtName.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtPercentage.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtRectangle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtScript.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShadowEffect.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShape.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtSpace.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtString.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTextDeco.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTime.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtURI.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/Expr.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprAdditiveOper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprInner.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprMultiplicativeOper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprUnaryOper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnAbs.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnBodyStart.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnCeiling.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFloor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnLabelEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnMax.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnMin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnProportionalColWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnRGB.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnRound.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/Function.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyCollection.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ValueCollection.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/NamespaceXML.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/prop/Lang.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtAngle.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtAngle.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtAngle.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -46,7 +46,8 @@
* @param value The signed angle value.
* @param units One of AngleDT.DEGREEES, AngleDT.GRADS, or AngleDT.RADIANS.
*/
- public DtAngle(float value, byte units) throws PropertyException {
+ public DtAngle(final float value, final byte units)
+ throws PropertyException {
if (! validUnits(units)) {
throw new PropertyException("Illegal angle unit ID: " + units);
}
@@ -74,7 +75,7 @@
* @param units One of AngleDT.DEGREES, AngleDT.GRADS, or AngleDT.RADIANS.
* @return The value, in degrees, of the angle.
*/
- public static float convertToDegrees(float value, byte units) {
+ public static float convertToDegrees(final float value, final byte units) {
switch (units) {
case DEGREES: {
return value;
@@ -99,7 +100,7 @@
* datatype in the XSL-FO spec, 1.0, Section 5.11.
* @return An AngleDT instance if input is valid, otherwise null;
*/
- public static DtAngle makeAngleDT(String input) {
+ public static DtAngle makeAngleDT(final String input) {
byte unitID = 0;
int index = input.indexOf("deg");
if (index > -1) {
@@ -120,16 +121,16 @@
if (! validUnits(unitID)) {
return null;
}
- String valuePortion = input.substring(0, index - 1);
+ final String valuePortion = input.substring(0, index - 1);
float value = 0;
try {
value = Float.parseFloat(valuePortion);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
try {
return new DtAngle(value, unitID);
- } catch (PropertyException e1) {
+ } catch (final PropertyException e1) {
/*
* The exception thrown by the constructor is to ensure that the
* units are valid, which we have already done above. Therefore,
@@ -139,7 +140,7 @@
}
}
- public static boolean validUnits(byte units) {
+ public static boolean validUnits(final byte units) {
if (units < DtAngle.DEGREES) {
return false;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCharacter.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCharacter.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCharacter.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -36,7 +36,7 @@
* Constructor.
* @param value The char value.
*/
- public DtCharacter(char value) {
+ public DtCharacter(final char value) {
this.value = value;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -251,7 +251,7 @@
* {@link #makeDtColor(String)}, {@link #makeDtColor(Color)}, or
* {@link #makeDtColor(float, float, float, float)}.
*/
- private DtColor(Color color) {
+ private DtColor(final Color color) {
this.value = color;
}
@@ -273,36 +273,36 @@
* @return A ColorDT instance, or null if input is not a defined XSL-FO
* named color.
*/
- public static DtColor makeDtColor(String input) {
+ public static DtColor makeDtColor(final String input) {
/* The names colors are static instances anyway, so no need to check
* the list of used colors. */
return mapNameToColorRGB(input);
}
- public static DtColor makeDtColor(Color color) {
- DtColor foundColor = DtColor.findColor(color);
+ public static DtColor makeDtColor(final Color color) {
+ final DtColor foundColor = DtColor.findColor(color);
/* If it has already been created, return the previously-created
* instance. */
if (foundColor != null) {
return foundColor;
}
/* Otherwise, create a new instance. */
- DtColor newDtColor = new DtColor(color);
+ final DtColor newDtColor = new DtColor(color);
DtColor.colorsUsed.add(newDtColor);
return newDtColor;
}
- public static DtColor makeDtColor(float red, float green, float blue,
- float alpha) {
- DtColor foundColor = DtColor.findColor(red, green, blue, alpha);
+ public static DtColor makeDtColor(final float red, final float green,
+ final float blue, final float alpha) {
+ final DtColor foundColor = DtColor.findColor(red, green, blue, alpha);
/* If it has already been created, return the previously-created
* instance. */
if (foundColor != null) {
return foundColor;
}
/* Otherwise, create a new instance. */
- Color newColor = new Color(red, green, blue, alpha);
- DtColor newDtColor = new DtColor(newColor);
+ final Color newColor = new Color(red, green, blue, alpha);
+ final DtColor newDtColor = new DtColor(newColor);
DtColor.colorsUsed.add(newDtColor);
return newDtColor;
}
@@ -314,9 +314,9 @@
* @return The already-created instance for <code>color</code>, or null
* if it has not yet been created.
*/
- private static DtColor findColor(Color color) {
+ private static DtColor findColor(final Color color) {
for (int i = 0; i < DtColor.getColorsUsed().size(); i++) {
- DtColor usedColor = (DtColor) DtColor.getColorsUsed().get(i);
+ final DtColor usedColor = (DtColor) DtColor.getColorsUsed().get(i);
if (usedColor.value.equals(color)) {
return usedColor;
}
@@ -334,12 +334,12 @@
* @return The already-created instance, or null if it has not yet been
* created.
*/
- private static DtColor findColor(float red, float green, float blue,
- float alpha) {
+ private static DtColor findColor(final float red, final float green,
+ final float blue, final float alpha) {
for (int i = 0; i < DtColor.getColorsUsed().size(); i++) {
- DtColor usedColor = (DtColor) DtColor.getColorsUsed().get(i);
- Color colorValue = usedColor.value;
- float[] components = colorValue.getRGBComponents(null);
+ final DtColor usedColor = (DtColor) DtColor.getColorsUsed().get(i);
+ final Color colorValue = usedColor.value;
+ final float[] components = colorValue.getRGBComponents(null);
if (components == null
|| components.length != 4) {
continue;
@@ -362,9 +362,9 @@
return DtColor.colorsUsed;
}
- public static DtColor mapNameToColorRGB(String colorName) {
+ public static DtColor mapNameToColorRGB(final String colorName) {
// Do a binary search to find the name in the names list.
- int index = Arrays.binarySearch(names, colorName);
+ final int index = Arrays.binarySearch(names, colorName);
if (index < 0 || index >= names.length) {
return null;
}
@@ -409,7 +409,7 @@
throw new PropertyException("Unknown colour format. Must "
+ "be #RGB or #RRGGBB");
}
- } catch (Exception e) {
+ } catch (final Exception e) {
red = 0;
green = 0;
blue = 0;
@@ -417,14 +417,14 @@
+ "#RGB or #RRGGBB");
}
} else if (value.startsWith("rgb(")) {
- int poss = value.indexOf("(");
- int pose = value.indexOf(")");
+ final int poss = value.indexOf("(");
+ final int pose = value.indexOf(")");
if (poss != -1 && pose != -1) {
value = value.substring(poss + 1, pose);
- StringTokenizer st = new StringTokenizer(value, ",");
+ final StringTokenizer st = new StringTokenizer(value, ",");
try {
if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
+ final String str = st.nextToken().trim();
if (str.endsWith("%")) {
red =
Integer.parseInt(str.substring(0, str.length()
@@ -435,7 +435,7 @@
}
}
if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
+ final String str = st.nextToken().trim();
if (str.endsWith("%")) {
green =
Integer.parseInt(str.substring(0, str.length()
@@ -446,7 +446,7 @@
}
}
if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
+ final String str = st.nextToken().trim();
if (str.endsWith("%")) {
blue =
Integer.parseInt(str.substring(0, str.length()
@@ -456,7 +456,7 @@
blue = Integer.parseInt(str) / 255f;
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
red = 0;
green = 0;
blue = 0;
@@ -473,7 +473,8 @@
blue = 0;
alpha = 1;
} else {
- DtColor foundColor = mapNameToColorRGB(value.toLowerCase());
+ final DtColor foundColor = mapNameToColorRGB(
+ value.toLowerCase());
if (foundColor == null) {
red = 0;
green = 0;
@@ -484,7 +485,7 @@
return foundColor;
}
}
- DtColor dtColor = DtColor.makeDtColor(red, green, blue, alpha);
+ final DtColor dtColor = DtColor.makeDtColor(red, green, blue, alpha);
return dtColor;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCountry.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCountry.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtCountry.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -542,7 +542,7 @@
* Constructor.
* @param value The country code.
*/
- public DtCountry(String value) {
+ public DtCountry(final String value) {
this.value = value.toLowerCase();
}
@@ -556,7 +556,7 @@
/**
* Set the value.
*/
- public void setValue(String value) {
+ public void setValue(final String value) {
this.value = value;
}
@@ -565,8 +565,8 @@
* @param countryCode A 2-letter or 3-letter ISO 3166 code.
* @return True if countryCode is found in validCountries, false otherwise.
*/
- public static boolean validCountry(String countryCode) {
- String normalized = countryCode.toLowerCase();
+ public static boolean validCountry(final String countryCode) {
+ final String normalized = countryCode.toLowerCase();
int index = Arrays.binarySearch(validCountries, normalized);
if (index >= 0) {
return true;
@@ -578,7 +578,7 @@
return false;
}
- public static DtCountry makeCountryDT(String countryCode) {
+ public static DtCountry makeCountryDT(final String countryCode) {
if (! validCountry(countryCode)) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtFrequency.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtFrequency.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtFrequency.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -40,7 +40,8 @@
/**
* Constructor.
*/
- public DtFrequency(double quantity, byte units) throws PropertyException {
+ public DtFrequency(final double quantity, final byte units)
+ throws PropertyException {
if (units < 1 || units > 2) {
throw new PropertyException("Invalid FrequencyDT unit ID.");
}
@@ -70,9 +71,9 @@
* @return The FrequencyDT instance constructed, or null if input is not
* valid.
*/
- public static DtFrequency makeFrequencyDT(String input) {
+ public static DtFrequency makeFrequencyDT(final String input) {
// Make a copy of input
- String useInput = new String(input);
+ final String useInput = new String(input);
useInput.trim();
byte units = -1;
int unitsLength = -1;
@@ -86,17 +87,17 @@
if (units < 1) {
return null;
}
- String quantityPart = useInput.substring(0, useInput.length()
+ final String quantityPart = useInput.substring(0, useInput.length()
- unitsLength);
double quantity;
try {
quantity = Double.parseDouble(quantityPart);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
try {
return new DtFrequency(quantity, units);
- } catch (PropertyException e1) {
+ } catch (final PropertyException e1) {
/*
* This should never happen, because we have already validated the
* input.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -37,7 +37,7 @@
* Constructor.
* @param value The signed number value.
*/
- public DtInteger(int value) {
+ public DtInteger(final int value) {
this.value = value;
}
@@ -51,7 +51,7 @@
/**
* Set the value.
*/
- public void setValue(int value) {
+ public void setValue(final int value) {
this.value = value;
}
@@ -59,7 +59,7 @@
return value;
}
- public void setNumericValue(double value) {
+ public void setNumericValue(final double value) {
this.value = (int) Math.round(value);
}
@@ -67,13 +67,13 @@
return this;
}
- public void setMinimumValue(int num) {
+ public void setMinimumValue(final int num) {
if (num > this.value) {
this.value = num;
}
}
- public void setMaximumValue(int num) {
+ public void setMaximumValue(final int num) {
if (num < this.value) {
this.value = num;
}
@@ -90,14 +90,14 @@
* created.
* @return An IntegerDT instance, or null if input is not valid.
*/
- public static DtInteger makeIntegerDT(String input) {
+ public static DtInteger makeIntegerDT(final String input) {
// Make a copy of input
- String useInput = new String(input);
+ final String useInput = new String(input);
useInput.trim();
int value = 0;
try {
value = Integer.parseInt(useInput);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
return new DtInteger(value);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtKeep.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtKeep.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtKeep.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -40,21 +40,22 @@
/**
* Constructor.
*/
- public DtKeep(int withinLine, int withinColumn, int withinPage) {
+ public DtKeep(final int withinLine, final int withinColumn,
+ final int withinPage) {
this.withinLine = withinLine;
this.withinColumn = withinColumn;
this.withinPage = withinPage;
}
- public void setWithinLine(int withinLine) {
+ public void setWithinLine(final int withinLine) {
this.withinLine = withinLine;
}
- public void setWithinColumn(int withinColumn) {
+ public void setWithinColumn(final int withinColumn) {
this.withinColumn = withinColumn;
}
- public void setWithinPage(int withinPage) {
+ public void setWithinPage(final int withinPage) {
this.withinPage = withinPage;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLanguage.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLanguage.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLanguage.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -39,7 +39,7 @@
* Constructor.
* @param value The language code.
*/
- public DtLanguage(String value) {
+ public DtLanguage(final String value) {
this.value = value;
}
@@ -53,11 +53,11 @@
/**
* Set the value.
*/
- public void setValue(String value) {
+ public void setValue(final String value) {
this.value = value;
}
- public static DtLanguage makeLanguageDT(String languageCode) {
+ public static DtLanguage makeLanguageDT(final String languageCode) {
if (! ISO639.validLanguage(languageCode)) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -73,7 +73,8 @@
* @param units A byte representation of the unit of measure (points,
* inches, etc.)
*/
- public DtLength(float value, String units) throws PropertyException {
+ public DtLength(final float value, final String units)
+ throws PropertyException {
this.value = value;
this.units = convertUnits(units);
if (this.units < 1 || this.units > 8) {
@@ -87,7 +88,7 @@
* @param percentBase The base to be used for percentage computations.
* @return The value of this length in millipoints.
*/
- public int getValue(int pointSize, int percentBase) {
+ public int getValue(final int pointSize, final int percentBase) {
switch (this.units) {
case UNIT_INCHES: {
return Math.round(this.value * 72 * 1000);
@@ -120,7 +121,7 @@
}
}
- public static byte convertUnits(String units) {
+ public static byte convertUnits(final String units) {
// Start at 1, not 0, as 0 is not a valid value.
for (byte i = 1; i < unitArray.length; i++) {
if (units.equals(unitArray[i])) {
@@ -140,7 +141,7 @@
/**
* Note that this sets the raw numeric value, without regard to units.
*/
- public void setNumericValue(double value) {
+ public void setNumericValue(final double value) {
this.value = (int) Math.round(value);
}
@@ -155,9 +156,9 @@
* created.
* @return A LengthDT instance, or null if input is not valid.
*/
- public static DtLength makeLengthDT(String input) {
+ public static DtLength makeLengthDT(final String input) {
// Make a copy of input
- String useInput = new String(input);
+ final String useInput = new String(input);
useInput.trim();
byte unitArrayIndex = -1;
for (byte i = 1; i < unitArray.length; i++) {
@@ -168,18 +169,18 @@
if (unitArrayIndex < 1) {
return null;
}
- int charsToTruncate = unitArray[unitArrayIndex].length();
- String valuePart = useInput.substring(0, useInput.length()
+ final int charsToTruncate = unitArray[unitArrayIndex].length();
+ final String valuePart = useInput.substring(0, useInput.length()
- charsToTruncate);
float value = 0;
try {
value = Float.parseFloat(valuePart);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
try {
return new DtLength(value, unitArray[unitArrayIndex]);
- } catch (PropertyException e1) {
+ } catch (final PropertyException e1) {
// This should never happen as we have already validated the input.
return null;
}
@@ -196,7 +197,7 @@
return true;
}
- public int evalUnitPower1(int pointSize, int percentBase) {
+ public int evalUnitPower1(final int pointSize, final int percentBase) {
return getValue(pointSize, percentBase);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthBPIPDirection.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthBPIPDirection.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthBPIPDirection.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -36,12 +36,13 @@
/**
* Constructor.
*/
- public DtLengthBPIPDirection(DtLength bpdLength, DtLength ipdLength) {
+ public DtLengthBPIPDirection(final DtLength bpdLength,
+ final DtLength ipdLength) {
this.bpdLength = bpdLength;
this.ipdLength = ipdLength;
}
- public void setBPDLength(DtLength length) {
+ public void setBPDLength(final DtLength length) {
this.bpdLength = length;
}
@@ -49,7 +50,7 @@
return this.bpdLength;
}
- public void setIPDLength(DtLength length) {
+ public void setIPDLength(final DtLength length) {
this.ipdLength = length;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthConditional.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthConditional.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthConditional.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -36,16 +36,17 @@
/**
* Constructor.
*/
- public DtLengthConditional(DtLength length, byte conditionality) {
+ public DtLengthConditional(final DtLength length,
+ final byte conditionality) {
this.length = length;
this.conditionality = conditionality;
}
- public void setLength(DtLength length) {
+ public void setLength(final DtLength length) {
this.length = length;
}
- public void setConditionality(byte conditionality) {
+ public void setConditionality(final byte conditionality) {
this.conditionality = conditionality;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthRange.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthRange.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLengthRange.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -37,22 +37,22 @@
/**
* Constructor.
*/
- public DtLengthRange(DtLength lengthMinimum, DtLength lengthOptimum,
- DtLength lengthMaximum) {
+ public DtLengthRange(final DtLength lengthMinimum,
+ final DtLength lengthOptimum, final DtLength lengthMaximum) {
this.lengthMinimum = lengthMinimum;
this.lengthOptimum = lengthOptimum;
this.lengthMaximum = lengthMaximum;
}
- public void setLengthMinimum(DtLength lengthMinimum) {
+ public void setLengthMinimum(final DtLength lengthMinimum) {
this.lengthMinimum = lengthMinimum;
}
- public void setLengthOptimum(DtLength lengthOptimum) {
+ public void setLengthOptimum(final DtLength lengthOptimum) {
this.lengthOptimum = lengthOptimum;
}
- public void setLengthMaximum(DtLength lengthMaximum) {
+ public void setLengthMaximum(final DtLength lengthMaximum) {
this.lengthMaximum = lengthMaximum;
}
@@ -75,7 +75,8 @@
* should be set.
* @return True if successful, false if the subPropertyName is not valid.
*/
- public boolean setComponent(String subPropertyName, DtLength length) {
+ public boolean setComponent(final String subPropertyName,
+ final DtLength length) {
if (subPropertyName.equals("minimum")) {
setLengthMinimum(length);
return true;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtName.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtName.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtName.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -38,7 +38,7 @@
* Constructor.
* @param value The string value of the name.
*/
- public DtName(String value) {
+ public DtName(final String value) {
this.value = value;
}
@@ -56,7 +56,7 @@
* @param input String containing the value to be converted to a NameDT.
* @return A new NameDT instance, or null if input is not valid.
*/
- public static DtName makeNameDT(String input) {
+ public static DtName makeNameDT(final String input) {
if (! XMLCharacter.isNCName(input)) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -37,7 +37,7 @@
* Constructor.
* @param value The signed length value.
*/
- public DtNumber(double value) {
+ public DtNumber(final double value) {
this.value = value;
}
@@ -52,12 +52,12 @@
return value;
}
- public void setNumericValue(double value) {
+ public void setNumericValue(final double value) {
this.value = value;
}
public DtInteger round() {
- int integer = (int) Math.round(this.value);
+ final int integer = (int) Math.round(this.value);
return new DtInteger(integer);
}
@@ -66,11 +66,11 @@
return 0;
}
- public static DtNumber makeNumberDT(String input) {
+ public static DtNumber makeNumberDT(final String input) {
double aNumber = 0;
try {
aNumber = Double.parseDouble(input);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
return new DtNumber(aNumber);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtPercentage.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtPercentage.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtPercentage.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -38,7 +38,7 @@
* @param value The percentage value. 85.6% should be expressed as 85.6,
* not .856.
*/
- public DtPercentage(float value) {
+ public DtPercentage(final float value) {
this.value = value;
}
@@ -53,7 +53,7 @@
return value;
}
- public void setNumericValue(double value) {
+ public void setNumericValue(final double value) {
this.value = (float) value;
}
@@ -67,18 +67,19 @@
* @return The PercentageDT instance constructed, or null if input is not
* valid.
*/
- public static DtPercentage makePercentageDT(String input) {
+ public static DtPercentage makePercentageDT(final String input) {
// Make a copy of input
- String useInput = new String(input);
+ final String useInput = new String(input);
useInput.trim();
if (! useInput.endsWith("%")) {
return null;
}
- String quantityPart = useInput.substring(0, useInput.length() - 1);
+ final String quantityPart = useInput.substring(0,
+ useInput.length() - 1);
float quantity;
try {
quantity = Float.parseFloat(quantityPart);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
return new DtPercentage(quantity);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtRectangle.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtRectangle.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtRectangle.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -48,8 +48,9 @@
/**
* Constructor.
*/
- public DtRectangle(PropertyValue topOffset, PropertyValue rightOffset,
- PropertyValue bottomOffset, PropertyValue leftOffset)
+ public DtRectangle(final PropertyValue topOffset,
+ final PropertyValue rightOffset,
+ final PropertyValue bottomOffset, final PropertyValue leftOffset)
throws PropertyException {
if (! validOffset(topOffset) || ! validOffset(rightOffset)
|| ! validOffset(bottomOffset) || ! validOffset(leftOffset)) {
@@ -61,9 +62,9 @@
this.leftOffset = leftOffset;
}
- private boolean validOffset(PropertyValue pv) {
+ private boolean validOffset(final PropertyValue pv) {
if (pv instanceof PropertyKeyword) {
- short keyword = ((PropertyKeyword) pv).getValue();
+ final short keyword = ((PropertyKeyword) pv).getValue();
if (keyword == Constants.FOVAL_AUTO) {
return true;
}
@@ -75,25 +76,26 @@
return false;
}
- public int getTopOffset(int pointSize, int percentBase) {
+ public int getTopOffset(final int pointSize, final int percentBase) {
return getOffset(topOffset, pointSize, percentBase);
}
- public int getRightOffset(int pointSize, int percentBase) {
+ public int getRightOffset(final int pointSize, final int percentBase) {
return getOffset(rightOffset, pointSize, percentBase);
}
- public int getBottomOffset(int pointSize, int percentBase) {
+ public int getBottomOffset(final int pointSize, final int percentBase) {
return getOffset(bottomOffset, pointSize, percentBase);
}
- public int getLeftOffset(int pointSize, int percentBase) {
+ public int getLeftOffset(final int pointSize, final int percentBase) {
return getOffset(leftOffset, pointSize, percentBase);
}
- private int getOffset(PropertyValue pv, int pointSize, int percentBase) {
+ private int getOffset(final PropertyValue pv, final int pointSize,
+ final int percentBase) {
if (pv instanceof PropertyKeyword) {
- short keyword = ((PropertyKeyword) pv).getValue();
+ final short keyword = ((PropertyKeyword) pv).getValue();
if (keyword == Constants.FOVAL_AUTO) {
return 0;
}
@@ -110,7 +112,7 @@
* @return The RectangleDT instance constructed, or null if input is not
* valid.
*/
- public static DtRectangle makeRectangleDT(String input) {
+ public static DtRectangle makeRectangleDT(final String input) {
// Make a copy of input
String useInput = new String(input);
useInput.trim();
@@ -122,19 +124,19 @@
return null;
}
useInput = useInput.substring(1, useInput.length() - 1);
- StringTokenizer st = new StringTokenizer(useInput, " ,");
+ final StringTokenizer st = new StringTokenizer(useInput, " ,");
if (st.countTokens() != 4) {
return null;
}
- PropertyValue[] pvArray = new PropertyValue[4];
+ final PropertyValue[] pvArray = new PropertyValue[4];
int pvIndex = 0;
while (st.hasMoreTokens()) {
- String token = st.nextToken();
+ final String token = st.nextToken();
if (token.equals("inherit")) {
pvArray[pvIndex] = new PropertyKeyword
(Constants.FOVAL_INHERIT);
}
- DtLength length = DtLength.makeLengthDT(token);
+ final DtLength length = DtLength.makeLengthDT(token);
if (length != null) {
pvArray[pvIndex] = length;
}
@@ -146,7 +148,7 @@
try {
return new DtRectangle(pvArray[0], pvArray[1], pvArray[2],
pvArray[3]);
- } catch (PropertyException e) {
+ } catch (final PropertyException e) {
// This should never happen, as we have already validated the input.
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtScript.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtScript.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtScript.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -152,7 +152,7 @@
* Constructor.
* @param value The 4-character script identifier.
*/
- public DtScript(String value) {
+ public DtScript(final String value) {
this.value = value;
}
@@ -166,7 +166,7 @@
/**
* Set the String value of this script.
*/
- public void setValue(String value) {
+ public void setValue(final String value) {
this.value = value;
}
@@ -175,8 +175,8 @@
* @param scriptCode A 4-character ISO 15924 code.
* @return True if scriptCode is found in validScripts, false otherwise.
*/
- public static boolean validScript(String scriptCode) {
- int index = Arrays.binarySearch(validScripts, scriptCode);
+ public static boolean validScript(final String scriptCode) {
+ final int index = Arrays.binarySearch(validScripts, scriptCode);
if (index >= 0) {
return true;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShadowEffect.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShadowEffect.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShadowEffect.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -44,29 +44,30 @@
* Constructor. See Section 7.16.5 in the XSL-FO Standard for the meanings
* of the parameters.
*/
- public DtShadowEffect(DtLength horizontalDistance,
- DtLength verticalDistance, DtLength blurRadius, DtColor color) {
+ public DtShadowEffect(final DtLength horizontalDistance,
+ final DtLength verticalDistance, final DtLength blurRadius,
+ final DtColor color) {
this.horizontalDistance = horizontalDistance;
this.verticalDistance = verticalDistance;
this.blurRadius = blurRadius;
this.color = color;
}
- public int getHorizontalDistance(int fontSize) {
+ public int getHorizontalDistance(final int fontSize) {
if (this.horizontalDistance == null) {
return 0;
}
return horizontalDistance.getValue(fontSize, 0);
}
- public int getVerticalDistance(int fontSize) {
+ public int getVerticalDistance(final int fontSize) {
if (this.verticalDistance == null) {
return 0;
}
return verticalDistance.getValue(fontSize, 0);
}
- public int getblurRadius(int fontSize) {
+ public int getblurRadius(final int fontSize) {
if (this.blurRadius == null) {
return 0;
}
@@ -87,21 +88,21 @@
* @return The ShadowEffectDT instance constructed, or null if input is not
* valid.
*/
- public static DtShadowEffect makeShadowEffectDT(String input) {
+ public static DtShadowEffect makeShadowEffectDT(final String input) {
// Make a copy of input
- String useInput = new String(input);
+ final String useInput = new String(input);
useInput.trim();
DtLength horizontalDistance = null;
DtLength verticalDistance = null;
DtLength blurRadius = null;
DtColor color = null;
- StringTokenizer st = new StringTokenizer(input);
+ final StringTokenizer st = new StringTokenizer(input);
if (st.countTokens() < 2 || st.countTokens() > 4) {
return null;
}
for (int i = 0; i < st.countTokens(); i++) {
- String token = st.nextToken();
- DtColor aColor = DtColor.makeDtColor(token);
+ final String token = st.nextToken();
+ final DtColor aColor = DtColor.makeDtColor(token);
if (aColor != null) {
// If it is a color, it must be either the first or last token.
if (i == 0 || i == st.countTokens() - 1
@@ -112,7 +113,7 @@
}
return null;
}
- DtLength aLength = DtLength.makeLengthDT(token);
+ final DtLength aLength = DtLength.makeLengthDT(token);
if (aLength == null) {
// This can only happen if the input is bad.
return null;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShape.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShape.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtShape.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -40,8 +40,8 @@
* @return The ShapeDT subclass instance if one is found, or null if one
* is not.
*/
- public static DtShape makeShapeDT(String input) {
- DtShape shape = DtRectangle.makeRectangleDT(input);
+ public static DtShape makeShapeDT(final String input) {
+ final DtShape shape = DtRectangle.makeRectangleDT(input);
if (shape != null) {
return shape;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtSpace.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtSpace.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtSpace.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -56,9 +56,9 @@
/**
* Constructor.
*/
- public DtSpace(Expr lengthMinimum, Expr lengthOptimum,
- Expr lengthMaximum, short conditionality, int precedence)
- throws PropertyException {
+ public DtSpace(final Expr lengthMinimum, final Expr lengthOptimum,
+ final Expr lengthMaximum, final short conditionality,
+ final int precedence) throws PropertyException {
if (lengthMinimum.unitPower() != 1
|| lengthOptimum.unitPower() != 1
|| lengthMaximum.unitPower() != 1) {
@@ -71,35 +71,35 @@
this.precedence = precedence;
}
- public void setLengthMinimum(DtLength lengthMinimum) {
+ public void setLengthMinimum(final DtLength lengthMinimum) {
this.lengthMinimum = lengthMinimum;
}
- public void setLengthOptimum(DtLength lengthOptimum) {
+ public void setLengthOptimum(final DtLength lengthOptimum) {
this.lengthOptimum = lengthOptimum;
}
- public void setLengthMaximum(DtLength lengthMaximum) {
+ public void setLengthMaximum(final DtLength lengthMaximum) {
this.lengthMaximum = lengthMaximum;
}
- public void setConditionality(short conditionality) {
+ public void setConditionality(final short conditionality) {
this.conditionality = conditionality;
}
- public void setPrecedence(int precedence) {
+ public void setPrecedence(final int precedence) {
this.precedence = precedence;
}
- public int getLengthMinimum(int pointSize, int percentBase) {
+ public int getLengthMinimum(final int pointSize, final int percentBase) {
return this.lengthMinimum.evalUnitPower1(pointSize, percentBase);
}
- public int getLengthOptimum(int pointSize, int percentBase) {
+ public int getLengthOptimum(final int pointSize, final int percentBase) {
return this.lengthOptimum.evalUnitPower1(pointSize, percentBase);
}
- public int getLengthMaximum(int pointSize, int percentBase) {
+ public int getLengthMaximum(final int pointSize, final int percentBase) {
return this.lengthMaximum.evalUnitPower1(pointSize, percentBase);
}
@@ -120,10 +120,10 @@
* for the subPropertyName given.
* @throws PropertyException If the subPropertyName is not valid.
*/
- public boolean addComponent(String subPropertyName, String value)
- throws PropertyException {
+ public boolean addComponent(final String subPropertyName,
+ final String value) throws PropertyException {
if (subPropertyName.equals("conditionality")) {
- short keyword = Property.getKeywordIndex(value,
+ final short keyword = Property.getKeywordIndex(value,
DtSpace.CONDITIONALITY_KEYWORDS);
if (keyword > 0) {
this.setConditionality(keyword);
@@ -132,7 +132,7 @@
return false;
}
if (subPropertyName.equals("precedence")) {
- short keyword = Property.getKeywordIndex(value,
+ final short keyword = Property.getKeywordIndex(value,
DtSpace.PRECEDENCE_KEYWORDS);
if (keyword == Constants.FOVAL_FORCE) {
this.setPrecedence(DtSpace.PRECEDENCE_FORCE);
@@ -141,13 +141,13 @@
int precedence = -1;
try {
precedence = Integer.parseInt(value);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return false;
}
this.setPrecedence(precedence);
return true;
}
- DtLength length = DtLength.makeLengthDT(value);
+ final DtLength length = DtLength.makeLengthDT(value);
if (length != null) {
if (subPropertyName.equals("minimum")) {
this.setLengthMaximum(length);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtString.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtString.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtString.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -36,7 +36,7 @@
* Constructor.
* @param value The string value.
*/
- public DtString(String value) {
+ public DtString(final String value) {
this.value = value;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTextDeco.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTextDeco.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTextDeco.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -46,8 +46,8 @@
/**
* Constructor.
*/
- public DtTextDeco(boolean isUnderlined, boolean isOverlined,
- boolean isLineThrough, boolean isBlink) {
+ public DtTextDeco(final boolean isUnderlined, final boolean isOverlined,
+ final boolean isLineThrough, final boolean isBlink) {
this.isUnderlined = isUnderlined;
this.isOverlined = isOverlined;
this.isLineThrough = isLineThrough;
@@ -63,7 +63,7 @@
/**
* @param isBlink The isBlink to set.
*/
- public void setBlink(boolean isBlink) {
+ public void setBlink(final boolean isBlink) {
this.isBlink = isBlink;
}
/**
@@ -75,7 +75,7 @@
/**
* @param isLineThrough The isLineThrough to set.
*/
- public void setLineThrough(boolean isLineThrough) {
+ public void setLineThrough(final boolean isLineThrough) {
this.isLineThrough = isLineThrough;
}
/**
@@ -87,7 +87,7 @@
/**
* @param isOverlined The isOverlined to set.
*/
- public void setOverlined(boolean isOverlined) {
+ public void setOverlined(final boolean isOverlined) {
this.isOverlined = isOverlined;
}
/**
@@ -99,7 +99,7 @@
/**
* @param isUnderlined The isUnderlined to set.
*/
- public void setUnderlined(boolean isUnderlined) {
+ public void setUnderlined(final boolean isUnderlined) {
this.isUnderlined = isUnderlined;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTime.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTime.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtTime.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -40,7 +40,8 @@
/**
* Constructor.
*/
- public DtTime(double quantity, byte units) throws PropertyException {
+ public DtTime(final double quantity, final byte units)
+ throws PropertyException {
if (units < 1 || units > 2) {
throw new PropertyException("Invalid TimeDT unit ID.");
}
@@ -70,9 +71,9 @@
* @return The TimeDT instance constructed, or null if input is not
* valid.
*/
- public static DtTime makeTimeDT(String input) {
+ public static DtTime makeTimeDT(final String input) {
// Make a copy of input
- String useInput = new String(input);
+ final String useInput = new String(input);
useInput.trim();
byte units = -1;
int unitsLength = -1;
@@ -86,17 +87,17 @@
if (units < 1) {
return null;
}
- String quantityPart = useInput.substring(0, useInput.length()
+ final String quantityPart = useInput.substring(0, useInput.length()
- unitsLength);
double quantity;
try {
quantity = Double.parseDouble(quantityPart);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return null;
}
try {
return new DtTime(quantity, units);
- } catch (PropertyException e1) {
+ } catch (final PropertyException e1) {
/*
* This should never happen, because we have already validated the
* input.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtURI.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtURI.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtURI.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -40,7 +40,7 @@
* Constructor.
* @param uriSpecification The String containing the URI specification.
*/
- public DtURI(String uriSpecification) {
+ public DtURI(final String uriSpecification) {
this.value = uriSpecification;
}
@@ -56,16 +56,16 @@
* @param input The String containing the URI specification.
* @return The created UriDT instance, or null if input is invalid.
*/
- public static DtURI makeUriDT(String input) {
- String useInput = URLUtil.normalizeURISpecification(input);
+ public static DtURI makeUriDT(final String input) {
+ final String useInput = URLUtil.normalizeURISpecification(input);
if (useInput == null) {
return null;
}
return new DtURI(useInput);
}
- public static ArrayList tokenizeURIList(String unparsedList) {
- ArrayList tokenizedList = new ArrayList();
+ public static ArrayList tokenizeURIList(final String unparsedList) {
+ final ArrayList tokenizedList = new ArrayList();
int startIndex = 0;
int endIndex = 0;
boolean stillProcessing = true;
@@ -76,7 +76,8 @@
break;
}
assert endIndex > startIndex: "URI list tokenization problem.";
- String substring = unparsedList.substring(startIndex, endIndex);
+ final String substring = unparsedList.substring(startIndex,
+ endIndex);
tokenizedList.add(substring);
startIndex = endIndex + 1;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -54,8 +54,8 @@
/**
* Constructor.
*/
- private DtWritingMode(byte ipdOdd, byte ipdEven, byte bpd, byte shiftOdd,
- byte shiftEven, boolean paired) {
+ private DtWritingMode(final byte ipdOdd, final byte ipdEven, final byte bpd,
+ final byte shiftOdd, final byte shiftEven, final boolean paired) {
this.ipdOdd = ipdOdd;
this.ipdEven = ipdEven;
this.bpd = bpd;
@@ -64,7 +64,8 @@
this.paired = paired;
}
- public static DtWritingMode obtainWritingMode(String writingModeName) {
+ public static DtWritingMode obtainWritingMode(
+ final String writingModeName) {
// See if it has already been created.
DtWritingMode wm = (DtWritingMode) writingModes.get(writingModeName);
// If it has already been created, return it.
@@ -83,7 +84,8 @@
return null;
}
- private static DtWritingMode createWritingMode(String writingModeName) {
+ private static DtWritingMode createWritingMode(
+ final String writingModeName) {
if (writingModeName.equals("lr-tb")) {
return new DtWritingMode(
Constants.DIRECTION_LEFT_TO_RIGHT,
@@ -335,7 +337,7 @@
* @return Either AXIS_HORIZONTAL or AXIS_VERTICAL, or -1 if writing-mode
* or input is invalid.
*/
- public byte getAbsoluteAxis(byte relativeAxis) {
+ public byte getAbsoluteAxis(final byte relativeAxis) {
switch (relativeAxis) {
case Constants.AXIS_BP: {
return getBPAxis();
@@ -354,7 +356,7 @@
* @return Either AXIS_IP or AXIS_BP, or -1 if writing-mode or input
* is invalid.
*/
- public byte getRelativeAxis(byte absoluteAxis) {
+ public byte getRelativeAxis(final byte absoluteAxis) {
switch (absoluteAxis) {
case Constants.AXIS_HORIZONTAL: {
return getHorizontalAxis();
@@ -565,7 +567,7 @@
* DIRECTION_RIGHT, DIRECTION_TOP, DIRECTION_BOTTOM, or -1 for invalid
* input or writing mode.
*/
- public byte getAbsoluteDirection(byte relativeDir) {
+ public byte getAbsoluteDirection(final byte relativeDir) {
switch (relativeDir) {
case Constants.DIRECTION_START: {
return getStart();
@@ -592,7 +594,7 @@
* DIRECTION_LEFT_TO_RIGHT, or DIRECTION_RIGHT_TO_LEFT, or -1 for invalid
* input or writing mode.
*/
- public byte getAbsoluteDirFromRelativeAxis(byte relativeAxis) {
+ public byte getAbsoluteDirFromRelativeAxis(final byte relativeAxis) {
switch (relativeAxis) {
case Constants.AXIS_BP: {
return this.bpd;
@@ -611,7 +613,7 @@
* DIRECTION_END, DIRECTION_BEFORE, DIRECTION_AFTER, or -1 for invalid
* input or writing mode.
*/
- public byte getRelativeDirection(byte absoluteDir) {
+ public byte getRelativeDirection(final byte absoluteDir) {
switch (absoluteDir) {
case Constants.DIRECTION_LEFT: {
return getLeft();
@@ -638,7 +640,7 @@
* direction. For relative direction input, the corresponding absolute
* direction. For an error either in the input or a bad writing mode, -1.
*/
- public int getCorresponding(int inputDirection) {
+ public int getCorresponding(final int inputDirection) {
switch (inputDirection) {
case Constants.DIRECTION_START: {
return getStart();
@@ -668,7 +670,7 @@
return -1;
}
- public static byte getOtherAxis(byte axis) {
+ public static byte getOtherAxis(final byte axis) {
if (axis == Constants.AXIS_HORIZONTAL) {
return Constants.AXIS_VERTICAL;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/Expr.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/Expr.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/Expr.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -68,7 +68,7 @@
* length must override this method.
* @return The unit power 1 value (length) of this expression.
*/
- public int evalUnitPower1(int pointSize, int percentBase) {
+ public int evalUnitPower1(final int pointSize, final int percentBase) {
return 0;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprAdditiveOper.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprAdditiveOper.java 2006-07-22 21:39:22 UTC (rev 7810)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprAdditiveOper.java 2006-07-22 22:07:57 UTC (rev 7811)
@@ -35,8 +35,9 @@
private ExprMultiplicative operand2;
private byte operation;
- public ExprAdditiveOper(ExprAdditive operand1, ExprMultiplicative operand2,
- byte operation) throws PropertyException {
+ public ExprAdditiveOper(final ExprAdditive operand1,
+ final ExprMultiplicative operand2,
+ final byte operation) throws PropertyException {
if (operand1.unitPower() < 0) {
throw new PropertyException("AdditiveExpr: Non-numeric operand: "
+ operand1.toString());
@@ -70,7 +71,7 @@
return false;
}
- public int evalUnitPower1(int pointSize, int percentBase) {
+ public int evalUnitPower1(final int pointSize, final int percentBase...
[truncated message content] |