Java BigDecimal Format formatCUBRIDNumber(BigDecimal value)

Here you can find the source of formatCUBRIDNumber(BigDecimal value)

Description

Format number to fit for CUBRID numeric type.

License

Open Source License

Parameter

Parameter Description
value Decimal number

Return

string

Declaration

public static String formatCUBRIDNumber(BigDecimal value) 

Method Source Code


//package com.java2s;

import java.math.BigDecimal;

import java.text.DecimalFormat;

public class Main {
    private final static String DEFAULT_NUMERIC_FORMAT = "#0.######################################";

    /**/*www . j av  a2  s.c o  m*/
     * Format number to fit for CUBRID numeric type.
     * 
     * @param value Decimal number
     * @return string
     */
    public static String formatCUBRIDNumber(BigDecimal value) {
        return new DecimalFormat(DEFAULT_NUMERIC_FORMAT).format(value);
    }
}

Related

  1. formatBigDecimal(BigDecimal valor, int decimal)
  2. formatBigDecimal(BigDecimal value, char thousandSep, char decimalPoint, int numDecimals)
  3. formatBigDecimal(String value)
  4. formatBigDecimalWithPrecise(BigDecimal number)
  5. formatCents(int cents)
  6. formatDecimal(BigDecimal b)
  7. formatDecimal(BigDecimal num)
  8. formatDecimal(BigDecimal number, int maxFractionDigits, int minFractionDigits)
  9. formatDecimalCost(BigDecimal value)