From: Vincent Hennebert Date: Fri, 3 Sep 2010 17:26:28 +0000 (+0000) Subject: Fixed typos and source code indentation issues. X-Git-Tag: fop-1_1rc1old~448 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41b4797e3a14ff13b1479e48e3d81c5086644142;p=xmlgraphics-fop.git Fixed typos and source code indentation issues. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@992386 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/afp/DataStream.java b/src/java/org/apache/fop/afp/DataStream.java index 843e3fa65..a437c3004 100644 --- a/src/java/org/apache/fop/afp/DataStream.java +++ b/src/java/org/apache/fop/afp/DataStream.java @@ -359,9 +359,9 @@ public class DataStream { * @param charSet is the AFP Character Set to use with the text * @throws UnsupportedEncodingException thrown if character encoding is not supported */ - public void createText - ( final AFPTextDataInfo textDataInfo, final int letterSpacing, final int wordSpacing, - final Font font, final CharacterSet charSet) throws UnsupportedEncodingException { + public void createText(final AFPTextDataInfo textDataInfo, final int letterSpacing, + final int wordSpacing, final Font font, final CharacterSet charSet) + throws UnsupportedEncodingException { int rotation = paintingState.getRotation(); if (rotation != 0) { textDataInfo.setRotation(rotation); diff --git a/src/java/org/apache/fop/afp/modca/ObjectContainer.java b/src/java/org/apache/fop/afp/modca/ObjectContainer.java index 515425906..9bc8dc594 100644 --- a/src/java/org/apache/fop/afp/modca/ObjectContainer.java +++ b/src/java/org/apache/fop/afp/modca/ObjectContainer.java @@ -113,7 +113,7 @@ public class ObjectContainer extends AbstractDataObject { } /** - * Sets the data for the the object container + * Sets the data for the object container * * @param data a byte array */ diff --git a/src/java/org/apache/fop/datatypes/Numeric.java b/src/java/org/apache/fop/datatypes/Numeric.java index c26cacd7c..2004c6721 100644 --- a/src/java/org/apache/fop/datatypes/Numeric.java +++ b/src/java/org/apache/fop/datatypes/Numeric.java @@ -29,15 +29,15 @@ import org.apache.fop.fo.expr.PropertyException; * Numerics can be either absolute or relative. Relative numerics * must be resolved against base value before the value can be used. *

- * To support relative numerics internally in the expresion parser and - * during evaulation one additional methods exists: isAbsolute() which + * To support relative numerics internally in the expression parser and + * during evaluation one additional methods exists: isAbsolute() which * return true for absolute numerics and false for relative numerics. */ public interface Numeric { /** * Return the value of this Numeric * @return the computed value. - * @throws PropertyException if a propert exception occurs + * @throws PropertyException if a property exception occurs */ double getNumericValue() throws PropertyException; @@ -45,7 +45,7 @@ public interface Numeric { * Return the value of this Numeric * @param context The context for the length calculation (for percentage based lengths) * @return the computed value. - * @throws PropertyException if a propert exception occurs + * @throws PropertyException if a property exception occurs */ double getNumericValue(PercentBaseContext context) throws PropertyException; @@ -78,9 +78,9 @@ public interface Numeric { int getValue(PercentBaseContext context); /** - * Return the resolved value. This method will becalled during evaluation + * Return the resolved value. This method will be called during evaluation * of the expression tree and relative numerics can then return a - * resolved absolute Numeric. Absolute numerics can just return themself. + * resolved absolute Numeric. Absolute numerics can just return themselves. * * @return A resolved value. * @throws PropertyException diff --git a/src/java/org/apache/fop/fo/expr/NumericOp.java b/src/java/org/apache/fop/fo/expr/NumericOp.java index d1f91d509..a2b203330 100644 --- a/src/java/org/apache/fop/fo/expr/NumericOp.java +++ b/src/java/org/apache/fop/fo/expr/NumericOp.java @@ -19,8 +19,8 @@ package org.apache.fop.fo.expr; -import org.apache.fop.datatypes.PercentBaseContext; import org.apache.fop.datatypes.Numeric; +import org.apache.fop.datatypes.PercentBaseContext; /** * This class contains static methods to evaluate operations on Numeric @@ -43,8 +43,7 @@ public final class NumericOp { * @throws PropertyException If the dimension of the operand is different * from the dimension of this Numeric. */ - public static Numeric addition(Numeric op1, Numeric op2) - throws PropertyException { + public static Numeric addition(Numeric op1, Numeric op2) throws PropertyException { if (op1.isAbsolute() && op2.isAbsolute()) { return addition2(op1, op2, null); } else { @@ -80,8 +79,7 @@ public final class NumericOp { * @throws PropertyException If the dimension of the operand is different * from the dimension of this Numeric. */ - public static Numeric subtraction(Numeric op1, Numeric op2) - throws PropertyException { + public static Numeric subtraction(Numeric op1, Numeric op2) throws PropertyException { if (op1.isAbsolute() && op2.isAbsolute()) { return subtraction2(op1, op2, null); } else { @@ -100,7 +98,7 @@ public final class NumericOp { * from the dimension of this Numeric. */ public static Numeric subtraction2(Numeric op1, Numeric op2, PercentBaseContext context) - throws PropertyException { + throws PropertyException { if (op1.getDimension() != op2.getDimension()) { throw new PropertyException("Can't subtract Numerics of different dimensions"); } @@ -117,8 +115,7 @@ public final class NumericOp { * @throws PropertyException If the dimension of the operand is different * from the dimension of this Numeric. */ - public static Numeric multiply(Numeric op1, Numeric op2) - throws PropertyException { + public static Numeric multiply(Numeric op1, Numeric op2) throws PropertyException { if (op1.isAbsolute() && op2.isAbsolute()) { return multiply2(op1, op2, null); } else { @@ -137,7 +134,7 @@ public final class NumericOp { * from the dimension of this Numeric. */ public static Numeric multiply2(Numeric op1, Numeric op2, PercentBaseContext context) - throws PropertyException { + throws PropertyException { return numeric(op1.getNumericValue(context) * op2.getNumericValue(context), op1.getDimension() + op2.getDimension()); } @@ -171,7 +168,7 @@ public final class NumericOp { * from the dimension of this Numeric. */ public static Numeric divide2(Numeric op1, Numeric op2, PercentBaseContext context) - throws PropertyException { + throws PropertyException { return numeric(op1.getNumericValue(context) / op2.getNumericValue(context), op1.getDimension() - op2.getDimension()); } @@ -183,8 +180,7 @@ public final class NumericOp { * @return A new Numeric object representing the absolute value. * @throws PropertyException if a property exception occurs */ - public static Numeric modulo(Numeric op1, Numeric op2) - throws PropertyException { + public static Numeric modulo(Numeric op1, Numeric op2) throws PropertyException { if (op1.isAbsolute() && op2.isAbsolute()) { return modulo2(op1, op2, null); } else { @@ -202,7 +198,7 @@ public final class NumericOp { * from the dimension of this Numeric. */ public static Numeric modulo2(Numeric op1, Numeric op2, PercentBaseContext context) - throws PropertyException { + throws PropertyException { return numeric(op1.getNumericValue(context) % op2.getNumericValue(context), op1.getDimension()); } @@ -213,8 +209,7 @@ public final class NumericOp { * @return a new Numeric object representing the absolute value of the operand. * @throws PropertyException if a property exception occurs */ - public static Numeric abs(Numeric op) - throws PropertyException { + public static Numeric abs(Numeric op) throws PropertyException { if (op.isAbsolute()) { return abs2(op, null); } else { @@ -230,8 +225,7 @@ public final class NumericOp { * @throws PropertyException If the dimension of the operand is different * from the dimension of this Numeric. */ - public static Numeric abs2(Numeric op, PercentBaseContext context) - throws PropertyException { + public static Numeric abs2(Numeric op, PercentBaseContext context) throws PropertyException { return numeric(Math.abs(op.getNumericValue(context)), op.getDimension()); } @@ -241,8 +235,7 @@ public final class NumericOp { * @return a new Numeric object representing the negation of the operand. * @throws PropertyException if a property exception occurs */ - public static Numeric negate(Numeric op) - throws PropertyException { + public static Numeric negate(Numeric op) throws PropertyException { if (op.isAbsolute()) { return negate2(op, null); } else { @@ -259,8 +252,7 @@ public final class NumericOp { * @throws PropertyException If the dimension of the operand is different * from the dimension of this Numeric. */ - public static Numeric negate2(Numeric op, PercentBaseContext context) - throws PropertyException { + public static Numeric negate2(Numeric op, PercentBaseContext context) throws PropertyException { return numeric(-op.getNumericValue(context), op.getDimension()); } @@ -271,8 +263,7 @@ public final class NumericOp { * @return a Numeric which is the maximum of the two operands. * @throws PropertyException if the dimensions or value types of the operands are different. */ - public static Numeric max(Numeric op1, Numeric op2) - throws PropertyException { + public static Numeric max(Numeric op1, Numeric op2) throws PropertyException { if (op1.isAbsolute() && op2.isAbsolute()) { return max2(op1, op2, null); } else { @@ -290,7 +281,7 @@ public final class NumericOp { * from the dimension of this Numeric. */ public static Numeric max2(Numeric op1, Numeric op2, PercentBaseContext context) - throws PropertyException { + throws PropertyException { if (op1.getDimension() != op2.getDimension()) { throw new PropertyException("Arguments to max() must have same dimensions"); } @@ -304,8 +295,7 @@ public final class NumericOp { * @return a Numeric which is the minimum of the two operands. * @throws PropertyException if the dimensions or value types of the operands are different. */ - public static Numeric min(Numeric op1, Numeric op2) - throws PropertyException { + public static Numeric min(Numeric op1, Numeric op2) throws PropertyException { if (op1.isAbsolute() && op2.isAbsolute()) { return min2(op1, op2, null); } else { @@ -323,7 +313,7 @@ public final class NumericOp { * from the dimension of this Numeric. */ public static Numeric min2(Numeric op1, Numeric op2, PercentBaseContext context) - throws PropertyException { + throws PropertyException { if (op1.getDimension() != op2.getDimension()) { throw new PropertyException("Arguments to min() must have same dimensions"); } diff --git a/src/java/org/apache/fop/fo/flow/table/TableFObj.java b/src/java/org/apache/fop/fo/flow/table/TableFObj.java index 6ba763933..fce82dcff 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableFObj.java +++ b/src/java/org/apache/fop/fo/flow/table/TableFObj.java @@ -217,11 +217,10 @@ public abstract class TableFObj extends FObj implements StructurePointerProperty */ i = 1; } - TableEventProducer eventProducer - = TableEventProducer.Provider.get(fo.getUserAgent().getEventBroadcaster()); - eventProducer.forceNextColumnNumber - (this, propertyList.getFObj().getName(), - val, i, propertyList.getFObj().getLocator()); + TableEventProducer eventProducer = TableEventProducer.Provider.get( + fo.getUserAgent().getEventBroadcaster()); + eventProducer.forceNextColumnNumber(this, propertyList.getFObj().getName(), + val, i, propertyList.getFObj().getLocator()); } return NumberProperty.getInstance(i); } @@ -231,9 +230,8 @@ public abstract class TableFObj extends FObj implements StructurePointerProperty } /** {@inheritDoc} */ - public void processNode - (String elementName, Locator locator, Attributes attlist, PropertyList pList) - throws FOPException { + public void processNode(String elementName, Locator locator, Attributes attlist, + PropertyList pList) throws FOPException { super.processNode(elementName, locator, attlist, pList); Table table = getTable(); if (!inMarker() && !table.isSeparateBorderModel()) { diff --git a/src/java/org/apache/fop/fo/pagination/Root.java b/src/java/org/apache/fop/fo/pagination/Root.java index 2a634c24a..8f8e0a509 100644 --- a/src/java/org/apache/fop/fo/pagination/Root.java +++ b/src/java/org/apache/fop/fo/pagination/Root.java @@ -212,7 +212,7 @@ public class Root extends FObj { * @throws IllegalArgumentException for negative additional page counts */ public void notifyPageSequenceFinished(int lastPageNumber, int additionalPages) - throws IllegalArgumentException { + throws IllegalArgumentException { if (additionalPages >= 0) { totalPagesGenerated += additionalPages; diff --git a/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java b/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java index 58f1ac210..3c0118181 100644 --- a/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java +++ b/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java @@ -58,7 +58,7 @@ public class BackgroundPositionShorthand extends ListProperty { * to "50%". */ public Property make(PropertyList propertyList, String value, FObj fo) - throws PropertyException { + throws PropertyException { Property p = super.make(propertyList, value, fo); if (p.getList().size() == 1) { /* only background-position-horizontal specified diff --git a/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java b/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java index 467682878..d2bab22ab 100644 --- a/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java @@ -54,9 +54,8 @@ public class BorderWidthPropertyMaker extends LengthProperty.Maker { * {@inheritDoc} */ - public Property get(int subpropId, PropertyList propertyList, - boolean bTryInherit, boolean bTryDefault) - throws PropertyException { + public Property get(int subpropId, PropertyList propertyList, boolean bTryInherit, + boolean bTryDefault) throws PropertyException { Property p = super.get(subpropId, propertyList, bTryInherit, bTryDefault); diff --git a/src/java/org/apache/fop/fo/properties/ColorProperty.java b/src/java/org/apache/fop/fo/properties/ColorProperty.java index e7b8d5931..293f31577 100644 --- a/src/java/org/apache/fop/fo/properties/ColorProperty.java +++ b/src/java/org/apache/fop/fo/properties/ColorProperty.java @@ -99,7 +99,7 @@ public final class ColorProperty extends Property { * @see ColorUtil#parseColorString(FOUserAgent, String) */ public static ColorProperty getInstance(FOUserAgent foUserAgent, String value) - throws PropertyException { + throws PropertyException { ColorProperty instance = new ColorProperty( ColorUtil.parseColorString( foUserAgent, value)); diff --git a/src/java/org/apache/fop/fo/properties/CommonHyphenation.java b/src/java/org/apache/fop/fo/properties/CommonHyphenation.java index 65b2cebbd..7b9b5bc82 100644 --- a/src/java/org/apache/fop/fo/properties/CommonHyphenation.java +++ b/src/java/org/apache/fop/fo/properties/CommonHyphenation.java @@ -92,7 +92,7 @@ public final class CommonHyphenation { * @throws PropertyException if a a property exception occurs */ public static CommonHyphenation getInstance(PropertyList propertyList) - throws PropertyException { + throws PropertyException { StringProperty language = (StringProperty) propertyList.get(Constants.PR_LANGUAGE); StringProperty country diff --git a/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java b/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java index 3edb84009..cbd34c9b3 100644 --- a/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java @@ -139,9 +139,8 @@ public class CompoundPropertyMaker extends PropertyMaker { * @return the property * @throws PropertyException if a property exception occurs */ - public Property get(int subpropertyId, PropertyList propertyList, - boolean tryInherit, boolean tryDefault) - throws PropertyException { + public Property get(int subpropertyId, PropertyList propertyList, boolean tryInherit, + boolean tryDefault) throws PropertyException { Property p = super.get(subpropertyId, propertyList, tryInherit, tryDefault); if (subpropertyId != 0 && p != null) { p = getSubprop(p, subpropertyId); @@ -254,7 +253,7 @@ public class CompoundPropertyMaker extends PropertyMaker { * @throws PropertyException ... */ protected Property makeCompound(PropertyList propertyList, FObj parentFO) - throws PropertyException { + throws PropertyException { Property p = makeNewProperty(); CompoundDatatype data = (CompoundDatatype) p.getObject(); for (int i = 0; i < Constants.COMPOUND_COUNT; i++) { diff --git a/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java b/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java index 330101ee7..f6fa806c9 100644 --- a/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java +++ b/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java @@ -52,7 +52,7 @@ public final class FontFamilyProperty extends ListProperty { * {@inheritDoc} */ public Property make(PropertyList propertyList, String value, FObj fo) - throws PropertyException { + throws PropertyException { if ("inherit".equals(value)) { return super.make(propertyList, value, fo); } else { diff --git a/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java b/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java index 60ef955ba..72884a177 100644 --- a/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java @@ -51,7 +51,7 @@ public class FontSizePropertyMaker * it is immediately replaced by the resolved {@link FixedLength}. */ public Property make(PropertyList propertyList, String value, FObj fo) - throws PropertyException { + throws PropertyException { Property p = super.make(propertyList, value, fo); if (p instanceof PercentLength) { Property pp = propertyList.getFromParent(this.propId); diff --git a/src/java/org/apache/fop/fo/properties/KeepProperty.java b/src/java/org/apache/fop/fo/properties/KeepProperty.java index 0bc44e459..9d04ce780 100644 --- a/src/java/org/apache/fop/fo/properties/KeepProperty.java +++ b/src/java/org/apache/fop/fo/properties/KeepProperty.java @@ -62,7 +62,7 @@ public final class KeepProperty extends Property implements CompoundDatatype { * {@inheritDoc} */ public Property convertProperty(Property p, PropertyList propertyList, FObj fo) - throws PropertyException { + throws PropertyException { if (p instanceof KeepProperty) { return p; } diff --git a/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java b/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java index 919dd84d0..c0c6a2ed7 100644 --- a/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java +++ b/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java @@ -44,7 +44,7 @@ public class PageDimensionMaker extends LengthProperty.Maker { * Return the default or user-defined fallback in case the value * was specified as "auto" * @param subpropId The subproperty id of the property being retrieved. - * Is 0 when retriving a base property. + * Is 0 when retrieving a base property. * @param propertyList The PropertyList object being built for this FO. * @param tryInherit true if inherited properties should be examined. * @param tryDefault true if the default value should be returned. diff --git a/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java b/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java index 387355623..59a6cafef 100644 --- a/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java +++ b/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java @@ -23,7 +23,7 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; /** - * A special property for representing an as yet implemented implemented property. + * A special property for representing an as yet unimplemented property. */ public class ToBeImplementedProperty extends Property { diff --git a/src/java/org/apache/fop/layoutmgr/PageBreaker.java b/src/java/org/apache/fop/layoutmgr/PageBreaker.java index 171b3fd4f..b65433bd7 100644 --- a/src/java/org/apache/fop/layoutmgr/PageBreaker.java +++ b/src/java/org/apache/fop/layoutmgr/PageBreaker.java @@ -554,7 +554,7 @@ public class PageBreaker extends AbstractBreaker { */ private boolean needBlankPageBeforeNew(int breakVal) { if (breakVal == Constants.EN_PAGE - || (pslm.getCurrentPage().getPageViewport().getPage().isEmpty())) { + || (pslm.getCurrentPage().getPageViewport().getPage().isEmpty())) { // any page is OK or we already have an empty page return false; } else { diff --git a/src/java/org/apache/fop/tools/anttasks/Fop.java b/src/java/org/apache/fop/tools/anttasks/Fop.java index c0a1ba9f7..58dd1fb5b 100644 --- a/src/java/org/apache/fop/tools/anttasks/Fop.java +++ b/src/java/org/apache/fop/tools/anttasks/Fop.java @@ -20,14 +20,6 @@ package org.apache.fop.tools.anttasks; // Ant -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Task; -import org.apache.tools.ant.types.FileSet; -import org.apache.tools.ant.util.GlobPatternMapper; - -// Java import java.io.BufferedOutputStream; import java.io.File; import java.io.IOException; @@ -36,17 +28,23 @@ import java.net.MalformedURLException; import java.util.List; import java.util.Vector; -// FOP +import org.xml.sax.SAXException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.impl.SimpleLog; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.DirectoryScanner; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.FileSet; +import org.apache.tools.ant.util.GlobPatternMapper; + import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.FopFactory; import org.apache.fop.apps.MimeConstants; import org.apache.fop.cli.InputHandler; -import org.apache.commons.logging.impl.SimpleLog; -import org.apache.commons.logging.Log; -import org.xml.sax.SAXException; - /** * Wrapper for FOP which allows it to be accessed from within an Ant task. * Accepts the inputs: @@ -156,7 +154,7 @@ public class Fop extends Task { } /** - * Sets the XSLT parameters + * Sets the XSLT parameters * @param xsltParams the XSLT parameters */ public void setXsltParams(String xsltParams) { @@ -267,7 +265,7 @@ public class Fop extends Task { /** * Set whether exceptions are thrown. * default is false. - * @param throwExceptions true if should be thrown + * @param throwExceptions true if exceptions should be thrown */ public void setThrowexceptions(boolean throwExceptions) { this.throwExceptions = throwExceptions; @@ -553,7 +551,7 @@ class FOPTaskStarter { // OR output file doesn't exist OR // output file is older than input file if (task.getForce() || !outf.exists() - || (task.getXmlFile().lastModified() > outf.lastModified() + || (task.getXmlFile().lastModified() > outf.lastModified() || task.getXsltFile().lastModified() > outf.lastModified())) { render(task.getXmlFile(), task.getXsltFile(), outf, outputFormat); actioncount++; @@ -639,8 +637,8 @@ class FOPTaskStarter { } } - private void renderInputHandler - (InputHandler inputHandler, File outFile, String outputFormat) throws Exception { + private void renderInputHandler(InputHandler inputHandler, File outFile, String outputFormat) + throws Exception { OutputStream out = null; try { out = new java.io.FileOutputStream(outFile); diff --git a/src/java/org/apache/fop/traits/MinOptMax.java b/src/java/org/apache/fop/traits/MinOptMax.java index 99fab1adf..45b55695f 100644 --- a/src/java/org/apache/fop/traits/MinOptMax.java +++ b/src/java/org/apache/fop/traits/MinOptMax.java @@ -56,8 +56,7 @@ public final class MinOptMax implements Serializable { * @return the corresponding instance * @throws IllegalArgumentException if min > opt || max < opt. */ - public static MinOptMax getInstance(int min, int opt, int max) - throws IllegalArgumentException { + public static MinOptMax getInstance(int min, int opt, int max) throws IllegalArgumentException { if (min > opt) { throw new IllegalArgumentException("min (" + min + ") > opt (" + opt + ")"); } @@ -168,8 +167,7 @@ public final class MinOptMax implements Serializable { * @throws ArithmeticException if this instance has strictly less shrink or stretch * than the operand */ - public MinOptMax minus(MinOptMax operand) - throws ArithmeticException { + public MinOptMax minus(MinOptMax operand) throws ArithmeticException { checkCompatibility(getShrink(), operand.getShrink(), "shrink"); checkCompatibility(getStretch(), operand.getStretch(), "stretch"); return new MinOptMax(min - operand.min, opt - operand.opt, max - operand.max); @@ -194,58 +192,54 @@ public final class MinOptMax implements Serializable { } /** - * Returns an instance with the given value added to the minimal value. + * Do not use, backwards compatibility only. Returns an instance with the + * given value added to the minimal value. * * @param minOperand the minimal value to be added. * @return an instance with the given value added to the minimal value. - * @throws IllegalArgumentException if min + minOperand > opt || max < opt. + * @throws IllegalArgumentException if + * min + minOperand > opt || max < opt. */ - // [GA] remove deprecation - no alternative specified - // @deprecated Do not use! It's only for backwards compatibility. - public MinOptMax plusMin(int minOperand) - throws IllegalArgumentException { + public MinOptMax plusMin(int minOperand) throws IllegalArgumentException { return getInstance(min + minOperand, opt, max); } /** - * Returns an instance with the given value subtracted to the minimal value. + * Do not use, backwards compatibility only. Returns an instance with the + * given value subtracted to the minimal value. * * @param minOperand the minimal value to be subtracted. * @return an instance with the given value subtracted to the minimal value. - * @throws IllegalArgumentException if min - minOperand > opt || max < opt. + * @throws IllegalArgumentException if + * min - minOperand > opt || max < opt. */ - // [GA] remove deprecation - no alternative specified - // @deprecated Do not use! It's only for backwards compatibility. - public MinOptMax minusMin(int minOperand) - throws IllegalArgumentException { + public MinOptMax minusMin(int minOperand) throws IllegalArgumentException { return getInstance(min - minOperand, opt, max); } /** - * Returns an instance with the given value added to the maximal value. + * Do not use, backwards compatibility only. Returns an instance with the + * given value added to the maximal value. * * @param maxOperand the maximal value to be added. * @return an instance with the given value added to the maximal value. - * @throws IllegalArgumentException if min > opt || max < opt + maxOperand. + * @throws IllegalArgumentException if + * min > opt || max < opt + maxOperand. */ - // [GA] remove deprecation - no alternative specified - // @deprecated Do not use! It's only for backwards compatibility. - public MinOptMax plusMax(int maxOperand) - throws IllegalArgumentException { + public MinOptMax plusMax(int maxOperand) throws IllegalArgumentException { return getInstance(min, opt, max + maxOperand); } /** - * Returns an instance with the given value subtracted to the maximal value. + * Do not use, backwards compatibility only. Returns an instance with the + * given value subtracted to the maximal value. * * @param maxOperand the maximal value to be subtracted. * @return an instance with the given value subtracted to the maximal value. - * @throws IllegalArgumentException if min > opt || max < opt - maxOperand. + * @throws IllegalArgumentException if + * min > opt || max < opt - maxOperand. */ - // [GA] remove deprecation - no alternative specified - // @deprecated Do not use! It's only for backwards compatibility. - public MinOptMax minusMax(int maxOperand) - throws IllegalArgumentException { + public MinOptMax minusMax(int maxOperand) throws IllegalArgumentException { return getInstance(min, opt, max - maxOperand); } @@ -256,8 +250,7 @@ public final class MinOptMax implements Serializable { * @return the product of this MinOptMax and the given factor * @throws IllegalArgumentException if the factor is negative */ - public MinOptMax mult(int factor) - throws IllegalArgumentException { + public MinOptMax mult(int factor) throws IllegalArgumentException { if (factor < 0) { throw new IllegalArgumentException("factor < 0; was: " + factor); } else if (factor == 1) {