Package java.math

Examples of java.math.BigInteger.shortValue()


                    if ( gt > 0 || lt < 0 )
                    {
                        throw new PSQLException(GT.tr("Bad value for type {0} : {1}", new Object[]{"short",s}),
                                                PSQLState.NUMERIC_VALUE_OUT_OF_RANGE);
                    }
                    return i.shortValue();

                }
                catch ( NumberFormatException ne )
                {
                    throw new PSQLException(GT.tr("Bad value for type {0} : {1}", new Object[]{"short",s}),
View Full Code Here


        // Write the digits.
        t = new BigInteger(bigint.toString());
        for (int i = 0; i < ndigits; ++i)
        {
            putInt16(stream, (short)(t.shortValue() & LONG_MASK));
            t = t.shiftRight(LONG_SHIFT);
        }
    }

    /**
 
View Full Code Here

                    if ( gt > 0 || lt < 0 )
                    {
                        throw new PSQLException(GT.tr("Bad value for type {0} : {1}", new Object[]{"short",s}),
                                                PSQLState.NUMERIC_VALUE_OUT_OF_RANGE);
                    }
                    return i.shortValue();

                }
                catch ( NumberFormatException ne )
                {
                    throw new PSQLException(GT.tr("Bad value for type {0} : {1}", new Object[]{"short",s}),
View Full Code Here

                    if ( gt > 0 || lt < 0 )
                    {
                        throw new PSQLException(GT.tr("Bad value for type {0} : {1}", new Object[]{"short",s}),
                                                PSQLState.NUMERIC_VALUE_OUT_OF_RANGE);
                    }
                    return i.shortValue();

                }
                catch ( NumberFormatException ne )
                {
                    throw new PSQLException(GT.tr("Bad value for type {0} : {1}", new Object[]{"short",s}),
View Full Code Here

        return values.get(index);
      case SUM:
        BigInteger sum = BigInteger.valueOf(0);
        for (int i = 0; i < values.size(); ++i)
          sum = sum.add(BigInteger.valueOf(values.get(i)));
        return sum.shortValue();
      case MIN:
        BigInteger minimum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (minimum.compareTo(BigInteger.valueOf(
              values.get(i))) > 0)
View Full Code Here

        BigInteger minimum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (minimum.compareTo(BigInteger.valueOf(
              values.get(i))) > 0)
            minimum = BigInteger.valueOf(values.get(i));
        return minimum.shortValue();
      case MAX:
        BigInteger maximum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (maximum.compareTo(BigInteger.valueOf(
              values.get(i))) < 0)
View Full Code Here

        BigInteger maximum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (maximum.compareTo(BigInteger.valueOf(
              values.get(i))) < 0)
            maximum = BigInteger.valueOf(values.get(i));
        return maximum.shortValue();
      case FIRST:
        return values.get(0);
      case LAST:
        return values.get(values.size() - 1);
      default:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.