Java BigDecimal to toObject(BigDecimal value)

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

Description

to Object

License

Open Source License

Declaration

public static final Object toObject(BigDecimal value) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

import java.util.Date;

public class Main {
    public static final Object toObject(byte value) {
        return new Byte(value);
    }//from   w  w w.ja v  a 2  s . c  o m

    public static final Object toObject(short value) {
        return new Short(value);
    }

    public static final Object toObject(int value) {
        return new Integer(value);
    }

    public static final Object toObject(long value) {
        return new Long(value);
    }

    public static final Object toObject(float value) {
        return new Float(value);
    }

    public static final Object toObject(double value) {
        return new Double(value);
    }

    public static final Object toObject(boolean value) {
        return new Boolean(value);
    }

    public static final Object toObject(Date value) {
        return value;
    }

    public static final Object toObject(BigDecimal value) {
        return value;
    }

    public static final Object toObject(String value) {
        return value;
    }
}

Related

  1. toDouble(final BigDecimal b)
  2. toInteger(BigDecimal b)
  3. toLong(BigDecimal value)
  4. toLongObject(@Nullable final BigDecimal value)
  5. toNumber(final BigDecimal bigDecimal, final Class clazz)
  6. toPercent(final BigDecimal decimalValue, final MathContext mathCntext)
  7. toScientificNotation(BigDecimal bd)
  8. toSimpleBigDecimal(Object num)
  9. toString(BigDecimal num)