/** @deprecated replaced with {@link #getIntValue} */ public int intValue() { return getIntValue(); } /** @deprecated replaced with {@link #getLongValue} */
public byte getByteValue() { long l = getIntValue(); if (l > Byte.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Byte.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (byte)l; }
public short getShortValue() { long l = getIntValue(); if (l > Short.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Short.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (short)l; }
private static int getIntValue(XmlObject o) { SchemaType s = o.schemaType(); switch (s.getDecimalSize()) { case SchemaType.SIZE_BIG_DECIMAL: return ((XmlObjectBase)o).getBigDecimalValue().intValue(); case SchemaType.SIZE_BIG_INTEGER: return ((XmlObjectBase)o).getBigIntegerValue().intValue(); case SchemaType.SIZE_LONG: return (int)((XmlObjectBase)o).getLongValue(); default: return ((XmlObjectBase)o).getIntValue(); } }
/** @deprecated replaced with {@link #getIntValue} */ public int intValue() { return getIntValue(); } /** @deprecated replaced with {@link #getLongValue} */
/** @deprecated replaced with {@link #getIntValue} */ public int intValue() { return getIntValue(); } /** @deprecated replaced with {@link #getLongValue} */
public byte getByteValue() { long l = getIntValue(); if (l > Byte.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Byte.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (byte)l; }
public byte getByteValue() { long l = getIntValue(); if (l > Byte.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Byte.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (byte)l; }
public short getShortValue() { long l = getIntValue(); if (l > Short.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Short.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (short)l; }
public short getShortValue() { long l = getIntValue(); if (l > Short.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Short.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (short)l; }
private static int getIntValue(XmlObject o) { SchemaType s = o.schemaType(); switch (s.getDecimalSize()) { case SchemaType.SIZE_BIG_DECIMAL: return ((XmlObjectBase)o).getBigDecimalValue().intValue(); case SchemaType.SIZE_BIG_INTEGER: return ((XmlObjectBase)o).getBigIntegerValue().intValue(); case SchemaType.SIZE_LONG: return (int)((XmlObjectBase)o).getLongValue(); default: return ((XmlObjectBase)o).getIntValue(); } }