public abstract class SchemaFormat
extends java.lang.Object
Provides static functions for converting data values to and from the lexical representations defined in XML Schema Part 2: Datatypes.
Constructor and Description |
---|
SchemaFormat() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatBoolean(boolean value)
Return
value formatted using XML Schema lexical representation for type boolean . |
static java.lang.String |
formatByte(byte value)
Return
value formatted using XML Schema lexical representation for type byte . |
static java.lang.String |
formatDecimal(java.math.BigDecimal value)
Return
value formatted using XML Schema lexical representation for type decimal . |
static java.lang.String |
formatDouble(double value)
Return
value formatted using XML Schema lexical representation for type double , or "NaN" / "Infinity" / "-Infinity". |
static java.lang.String |
formatFloat(float value)
Return
value formatted using XML Schema lexical representation for type float , or "NaN" / "Infinity" / "-Infinity". |
static java.lang.String |
formatInt(int value)
Return
value formatted using XML Schema lexical representation for type int . |
static java.lang.String |
formatInteger(java.math.BigInteger value)
Return
value formatted using XML Schema lexical representation for type integer . |
static java.lang.String |
formatLong(long value)
Return
value formatted using XML Schema lexical representation for type long . |
static java.lang.String |
formatShort(short value)
Return
value formatted using XML Schema lexical representation for type short . |
static java.lang.String |
formatUnsignedByte(int value)
Return
value formatted using XML Schema lexical representation for type unsignedByte . |
static java.lang.String |
formatUnsignedShort(int value)
Return
value formatted using XML Schema lexical representation for type unsignedByte . |
static java.lang.Boolean |
parseBoolean(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type boolean . |
static java.lang.Byte |
parseByte(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type byte . |
static java.math.BigDecimal |
parseDecimal(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type decimal . |
static java.lang.Double |
parseDouble(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type double . |
static java.lang.Float |
parseFloat(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type float . |
static java.lang.Integer |
parseInt(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type int . |
static java.math.BigInteger |
parseInteger(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type integer . |
static java.lang.Long |
parseLong(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type long . |
static java.lang.Short |
parseShort(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type short . |
static java.lang.Integer |
parseUnsignedByte(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type unsignedByte . |
static java.lang.Integer |
parseUnsignedShort(java.lang.String text)
Return (nullable)
value parsed from XML Schema lexical representation for type unsignedSHort . |
static boolean |
toBoolean(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type boolean . |
static byte |
toByte(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type byte . |
static java.math.BigDecimal |
toDecimal(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type decimal . |
static double |
toDouble(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type double . |
static float |
toFloat(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type float . |
static int |
toInt(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type int . |
static java.math.BigInteger |
toInteger(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type integer . |
static long |
toLong(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type long . |
static short |
toShort(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type short . |
static int |
toUnsignedByte(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type unsignedByte . |
static int |
toUnsignedShort(java.lang.String text)
Return
value parsed from XML Schema lexical representation for type unsignedSHort . |
public static java.lang.String formatBoolean(boolean value)
Return value
formatted using XML Schema lexical representation for type boolean
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type boolean
.public static java.lang.String formatByte(byte value)
Return value
formatted using XML Schema lexical representation for type byte
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type byte
.public static java.lang.String formatDecimal(java.math.BigDecimal value)
Return value
formatted using XML Schema lexical representation for type decimal
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type decimal
.public static java.lang.String formatDouble(double value)
Return value
formatted using XML Schema lexical representation for type double
, or "NaN" / "Infinity" / "-Infinity".
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type double
, or "NaN" / "Infinity" / "-Infinity".public static java.lang.String formatFloat(float value)
Return value
formatted using XML Schema lexical representation for type float
, or "NaN" / "Infinity" / "-Infinity".
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type float
, or "NaN" / "Infinity" / "-Infinity".public static java.lang.String formatInt(int value)
Return value
formatted using XML Schema lexical representation for type int
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type int
.public static java.lang.String formatInteger(java.math.BigInteger value)
Return value
formatted using XML Schema lexical representation for type integer
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type integer
.public static java.lang.String formatLong(long value)
Return value
formatted using XML Schema lexical representation for type long
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type long
.public static java.lang.String formatShort(short value)
Return value
formatted using XML Schema lexical representation for type short
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type short
.public static java.lang.String formatUnsignedByte(int value)
Return value
formatted using XML Schema lexical representation for type unsignedByte
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type unsignedByte
.public static java.lang.String formatUnsignedShort(int value)
Return value
formatted using XML Schema lexical representation for type unsignedByte
.
value
- Value to be formatted.value
formatted using XML Schema lexical representation for type unsignedByte
.public static java.lang.Boolean parseBoolean(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type boolean
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Byte parseByte(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type byte
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.math.BigDecimal parseDecimal(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type decimal
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Double parseDouble(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type double
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Float parseFloat(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type float
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Integer parseInt(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type int
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.math.BigInteger parseInteger(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type integer
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Long parseLong(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type long
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Short parseShort(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type short
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Integer parseUnsignedByte(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type unsignedByte
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.lang.Integer parseUnsignedShort(java.lang.String text)
Return (nullable) value
parsed from XML Schema lexical representation for type unsignedSHort
.
FormatException
(non-fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static boolean toBoolean(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type boolean
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static byte toByte(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type byte
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.math.BigDecimal toDecimal(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type decimal
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static double toDouble(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type double
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static float toFloat(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type float
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static int toInt(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type int
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static java.math.BigInteger toInteger(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type integer
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static long toLong(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type long
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static short toShort(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type short
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static int toUnsignedByte(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type unsignedByte
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.public static int toUnsignedShort(java.lang.String text)
Return value
parsed from XML Schema lexical representation for type unsignedSHort
.
FormatException
(fatal) if the value is not in the expected format.
text
- XML Schema lexical representation for value to be parsed.