|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.util.ConversionUtils
public final class ConversionUtils
This class contains utility methods for conversions, like a java.lang.String to an array of int or double.
| Method Summary | |
|---|---|
static double[] |
toDoubleArray(java.lang.String baseString,
java.lang.String separatorPattern)
Converts the given base String into
an array of double, splitting the base along the
given separator pattern. |
static int[] |
toIntArray(java.lang.String baseString,
java.lang.String separatorPattern)
Converts the given base String into
an array of int, splitting the base along the
given separator pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int[] toIntArray(java.lang.String baseString,
java.lang.String separatorPattern)
String into
an array of int, splitting the base along the
given separator pattern.
Note: this method assumes the input is a string containing
only decimal integers, signed or unsigned, that are parsable
by java.lang.Integer.parseInt(String). If this
is not the case, the resulting NumberFormatException
will have to be handled by the caller.
baseString - the base stringseparatorPattern - the pattern separating the integer values
(if this is null, the baseString is parsed as one
integer value)
int whose size is equal to the number
values in the input string; null if this number
is equal to zero.
public static double[] toDoubleArray(java.lang.String baseString,
java.lang.String separatorPattern)
String into
an array of double, splitting the base along the
given separator pattern.
Note: this method assumes the input is a string containing
only decimal doubles, signed or unsigned, that are parsable
by java.lang.Double.parseDouble(String). If this
is not the case, the resulting NumberFormatException
will have to be handled by the caller.
baseString - the base stringseparatorPattern - the pattern separating the integer values
(if this is null, the baseString is parsed as one
double value)
double whose size is equal to the number
values in the input string; null if this number
is equal to zero.
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||