/** @deprecated replaced with {@link #getLongValue} */ public long longValue() { return getLongValue(); } /** @deprecated replaced with {@link #getBigIntegerValue} */
public int getIntValue() { long l = getLongValue(); if (l > Integer.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Integer.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (int)l; } private static final BigInteger _max = BigInteger.valueOf(Long.MAX_VALUE);
private static long getLongValue(XmlObject o) { SchemaType s = o.schemaType(); switch (s.getDecimalSize()) { case SchemaType.SIZE_BIG_DECIMAL: return ((XmlObjectBase)o).getBigDecimalValue().longValue(); case SchemaType.SIZE_BIG_INTEGER: return ((XmlObjectBase)o).getBigIntegerValue().longValue(); case SchemaType.SIZE_LONG: return ((XmlObjectBase)o).getLongValue(); default: throw new IllegalStateException("Bad facet type: " + s); } }
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 #getLongValue} */ public long longValue() { return getLongValue(); } /** @deprecated replaced with {@link #getBigIntegerValue} */
/** @deprecated replaced with {@link #getLongValue} */ public long longValue() { return getLongValue(); } /** @deprecated replaced with {@link #getBigIntegerValue} */
public int getIntValue() { long l = getLongValue(); if (l > Integer.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Integer.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (int)l; } private static final BigInteger _max = BigInteger.valueOf(Long.MAX_VALUE);
public int getIntValue() { long l = getLongValue(); if (l > Integer.MAX_VALUE) throw new XmlValueOutOfRangeException(); if (l < Integer.MIN_VALUE) throw new XmlValueOutOfRangeException(); return (int)l; } private static final BigInteger _max = BigInteger.valueOf(Long.MAX_VALUE);
private static long getLongValue(XmlObject o) { SchemaType s = o.schemaType(); switch (s.getDecimalSize()) { case SchemaType.SIZE_BIG_DECIMAL: return ((XmlObjectBase)o).getBigDecimalValue().longValue(); case SchemaType.SIZE_BIG_INTEGER: return ((XmlObjectBase)o).getBigIntegerValue().longValue(); case SchemaType.SIZE_LONG: return ((XmlObjectBase)o).getLongValue(); default: throw new IllegalStateException("Bad facet type: " + s); } }
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(); } }