Examples of toPlainString()


Examples of java.math.BigDecimal.toPlainString()

                        return false;
                    }
                    break;
                case NUMERIC_BIGDECIMAL:
                    final BigDecimal numericBigDecimal = (BigDecimal) dcv.getNumericValue();
                    if ( !expected[ i ].equals( numericBigDecimal.toPlainString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_BIGINTEGER:
                    final BigInteger numericBigInteger = (BigInteger) dcv.getNumericValue();
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

        }
        for (Map.Entry<Long, BigDecimal> entry : typeIdToPriceMap.entrySet()) {
            Long typeID = entry.getKey();
            BigDecimal price = entry.getValue();
            if (price.compareTo(BigDecimal.ZERO) > 0) {
                calculationExpression.getPriceSetItemTypeIdToPriceMap().put(typeID, price.toPlainString());
            }
        }
    }

    private void recursivelyPopulateCalculationExpressionWithPriceInformation(CalculationTreeNode treeNode, Map<Long, BigDecimal> typeIdToPriceMap) {
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

    if ( value==null || value.length()==0 ) {
      result.put(fieldName, "");
    } else {
      BigDecimal bdvalue = new BigDecimal(value);
      bdvalue = bdvalue.multiply(new BigDecimal("100")).setScale(0,RoundingMode.HALF_UP);
      result.put(fieldName, bdvalue.toPlainString());
    }
    }

    private void evaluateDecode(String fieldName, List<String> commandParams, List<String> colName, List<String> colValue, Map<String, String> result) throws T24Exception {
        String value = "";
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

    bdec = bdec.multiply(new BigDecimal("0.01")).setScale(2,RoundingMode.HALF_UP);
    if(fromCent){
      bdec = bdec.multiply(new BigDecimal("0.01")).setScale(2,RoundingMode.HALF_UP);
    }
   
    String value = bdec.toPlainString();
    result.put(fieldName, value);
    }

    private void evaluatePASS(String fieldName, List<String> commandParams, List<String> colName, List<String> colValue, Map<String, String> result) {
        result.put(fieldName, con.tcPass);
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

    if(value==null||value.length()==0) {
      result.put(fieldName, null);
    } else {
      BigDecimal bdec = new BigDecimal(value);
      bdec = bdec.multiply(new BigDecimal("0.01"));
      value = bdec.toPlainString();
      result.put(fieldName, value);
    }
    }

    private void evaluateSplit(String fieldName, List<String> commandParams, List<String> colName, List<String> colValue, Map<String, String> result) throws T24Exception {
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

        Element packagingTypeElement = UtilXml.addChildElement(packageElement, "PackagingType", requestDoc);
        UtilXml.addChildElementValue(packagingTypeElement, "Code", "00", requestDoc);
        UtilXml.addChildElementValue(packagingTypeElement, "Description", "Unknown PackagingType", requestDoc);
        UtilXml.addChildElementValue(packageElement, "Description", "Package Description", requestDoc);
        Element packageWeightElement = UtilXml.addChildElement(packageElement, "PackageWeight", requestDoc);
        UtilXml.addChildElementValue(packageWeightElement, "Weight", packageWeight.toPlainString(), requestDoc);
        //If product is in shippable Package then it we should have one product per packagemap
        if (packageMap.size() ==1) {
            Iterator<String> i = packageMap.keySet().iterator();
            String productId = i.next();
            Map<String, Object> productInfo = getProductItemInfo(shippableItemInfo, productId);
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

        ctx.put("finAccountId", "TESTACCOUNT1");
        ctx.put("amount", new BigDecimal("100.00"));
        ctx.put("userLogin", userLogin);
        Map resp = dispatcher.runSync("finAccountDeposit", ctx);
        BigDecimal balance = (BigDecimal) resp.get("balance");
        assertEquals(balance.toPlainString(), "100.00");
    }

    public void testWithdraw() throws Exception {
        Map ctx = FastMap.newInstance();
        ctx.put("finAccountId", "TESTACCOUNT1");
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

          else if (property.isSetDecimal()) {
             BigDecimal d = property.getDecimal();
             if (d == null) {
                val = null;
             } else {
                val = d.toPlainString();
             }
          }

          else if (property.isSetArray()) {
             // TODO Fetch the array values and output
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

    @Test
    public void runMyTest() {
        BigDecimal scientificNotation = new BigDecimal("0.000000001");
        assertTrue(scientificNotation.toString().contains("E"));
        assertFalse(scientificNotation.toPlainString().contains("E"));
    }
}
View Full Code Here

Examples of java.math.BigDecimal.toPlainString()

                    }
                }
            } else {
                int outputScale = Math.min(Math.max(fraction.scale(), minWidth), maxWidth);
                fraction = fraction.setScale(outputScale, RoundingMode.FLOOR);
                String str = fraction.toPlainString().substring(2);
                str = decimalStyle.convertNumberToI18N(str);
                if (decimalPoint) {
                    buf.append(decimalStyle.getDecimalSeparator());
                }
                buf.append(str);
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.