Examples of movePointRight()


Examples of java.math.BigDecimal.movePointRight()

                l = b.movePointRight(4).longValue();
                b.movePointLeft(4);
                if (d >= Math.pow(10, -4) && d < 1) {
                    requireScientificRepresentation = false;
                    precision += 4 - String.valueOf(l).length();
                    l = b.movePointRight(precision + 1).longValue();
                    b.movePointLeft(precision + 1);
                    if (String.valueOf(l).length() <= formatToken
                            .getPrecision()) {
                        precision++;
                    }
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

                    b.movePointLeft(precision + 1);
                    if (String.valueOf(l).length() <= formatToken
                            .getPrecision()) {
                        precision++;
                    }
                    l = b.movePointRight(precision).longValue();
                    b.movePointLeft(precision);
                    if (l >= Math.pow(10, precision - 4)) {
                        formatToken.setPrecision(precision);
                    }
                }
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

    calendar.add( Calendar.SECOND,  (_seconds == null)
        ? 0 : addition ? _seconds.intValue() : 0 - _seconds.intValue());

    if(_seconds!=null) {
      BigDecimal fraction = _seconds.subtract(_seconds.setScale(0,BigDecimal.ROUND_DOWN));
      int millisec = fraction.movePointRight(3).intValue();
      calendar.add( Calendar.MILLISECOND, addition ? millisec : 0 - millisec);
    }
  }

  private static int parseInt(String value){
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

        calendar.add(Calendar.SECOND, getSeconds() * signum);

        if (seconds != null) {
            BigDecimal fraction =
                seconds.subtract(seconds.setScale(0, BigDecimal.ROUND_DOWN));
            int millisec = fraction.movePointRight(3).intValue();
            calendar.add(Calendar.MILLISECOND, millisec * signum);
        }
    }
   
    /**
 
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

        calendar.add(Calendar.SECOND, getSeconds() * signum);

        if (seconds != null) {
            BigDecimal fraction =
                seconds.subtract(seconds.setScale(0, BigDecimal.ROUND_DOWN));
            int millisec = fraction.movePointRight(3).intValue();
            calendar.add(Calendar.MILLISECOND, millisec * signum);
        }
    }

    /**
 
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

        }
        else{
            res=a_y.subtract(a_x);
        }
        int p=0;
        while(res.movePointRight(++p).compareTo(BigDecimal.ONE)<0);
        return p-1;
    }

    /***************************************
     *
 
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

                                           });
                throw new InvalidDatatypeValueException(msg);
            }
        }
        if ((fFacetsDefined & DatatypeValidator.FACET_TOTALDIGITS)!=0) {
            int totalDigits = d.movePointRight(d.scale()).toString().length() -
                              ((d.signum() < 0) ? 1 : 0); // account for minus sign
            if (totalDigits > fTotalDigits) {

                String msg = getErrorString(
                                           DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.TOTALDIGITS_EXCEEDED],
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

          Integer.valueOf(m.group(MIN_MG)));
      if (m.group(SEC_MG) != null) {
          BigDecimal sec = new BigDecimal(m.group(SEC_MG).substring(1));
          this.set(SECOND, sec.intValue());
          BigDecimal fraction = sec.subtract(sec.setScale(0, BigDecimal.ROUND_DOWN));
          int millisec = fraction.movePointRight(3).intValue();
          this.set(Calendar.MILLISECOND, millisec);
      }
     

      String tz = m.group(TZ_MG);
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

    calendar.add( Calendar.SECOND,  (_seconds == null)
        ? 0 : _seconds.intValue());
   
    if(_seconds!=null) {
      BigDecimal fraction = _seconds.subtract(_seconds.setScale(0,BigDecimal.ROUND_DOWN));
      int millisec = fraction.movePointRight(3).intValue();
      calendar.add( Calendar.MILLISECOND, millisec );
    }
  }
 
  private static int parseInt(String value){
View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

                throw new InvalidDatatypeValueException(
                    getErrorString(DatatypeMessageProvider.ScaleExceeded,
                                   DatatypeMessageProvider.MSG_NONE,
                                   new Object[] { content }));
        if (fIsPrecision) {
            int precision = d.movePointRight(d.scale()).toString().length() -
                ((d.signum() < 0) ? 1 : 0); // account for minus sign
            if (precision > fPrecision)
                throw new InvalidDatatypeValueException(
                    getErrorString(DatatypeMessageProvider.PrecisionExceeded,
                                   DatatypeMessageProvider.MSG_NONE,
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.