Uses of Class
java.math.BigDecimal
| Package | Description |
|---|---|
| java.math | |
| java.sql | |
| java.util | |
| javax.sql | |
| javax.xml.datatype | |
| libcore.icu | |
| SQLite.JDBC2z |
-
Uses of BigDecimal in java.math
Fields in java.math declared as BigDecimal Modifier and Type Field Description static BigDecimalBigDecimal. ONEThe constant one as aBigDecimal.static BigDecimalBigDecimal. TENThe constant ten as aBigDecimal.static BigDecimalBigDecimal. ZEROThe constant zero as aBigDecimal.Methods in java.math that return BigDecimal Modifier and Type Method Description BigDecimalBigDecimal. abs()Returns aBigDecimalwhose value is the absolute value ofthis.BigDecimalBigDecimal. abs(MathContext mc)Returns aBigDecimalwhose value is the absolute value ofthis.BigDecimalBigDecimal. add(BigDecimal augend)Returns a newBigDecimalwhose value isthis + augend.BigDecimalBigDecimal. add(BigDecimal augend, MathContext mc)Returns a newBigDecimalwhose value isthis + augend.BigDecimalBigDecimal. divide(BigDecimal divisor)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, int roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, int scale, int roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, int scale, RoundingMode roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, MathContext mc)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, RoundingMode roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimal[]BigDecimal. divideAndRemainder(BigDecimal divisor)Returns aBigDecimalarray which contains the integral part ofthis / divisorat index 0 and the remainderthis % divisorat index 1.BigDecimal[]BigDecimal. divideAndRemainder(BigDecimal divisor, MathContext mc)Returns aBigDecimalarray which contains the integral part ofthis / divisorat index 0 and the remainderthis % divisorat index 1.BigDecimalBigDecimal. divideToIntegralValue(BigDecimal divisor)Returns a newBigDecimalwhose value is the integral part ofthis / divisor.BigDecimalBigDecimal. divideToIntegralValue(BigDecimal divisor, MathContext mc)Returns a newBigDecimalwhose value is the integral part ofthis / divisor.BigDecimalBigDecimal. max(BigDecimal val)Returns the maximum of thisBigDecimalandval.BigDecimalBigDecimal. min(BigDecimal val)Returns the minimum of thisBigDecimalandval.BigDecimalBigDecimal. movePointLeft(int n)Returns a newBigDecimalinstance where the decimal point has been movednplaces to the left.BigDecimalBigDecimal. movePointRight(int n)Returns a newBigDecimalinstance where the decimal point has been movednplaces to the right.BigDecimalBigDecimal. multiply(BigDecimal multiplicand)Returns a newBigDecimalwhose value isthis * multiplicand.BigDecimalBigDecimal. multiply(BigDecimal multiplicand, MathContext mc)Returns a newBigDecimalwhose value isthis * multiplicand.BigDecimalBigDecimal. negate()Returns a newBigDecimalwhose value is the-this.BigDecimalBigDecimal. negate(MathContext mc)Returns a newBigDecimalwhose value is the-this.BigDecimalBigDecimal. plus()Returns a newBigDecimalwhose value is+this.BigDecimalBigDecimal. plus(MathContext mc)Returns a newBigDecimalwhose value is+this.BigDecimalBigDecimal. pow(int n)Returns a newBigDecimalwhose value isthis<sup>n</sup>.BigDecimalBigDecimal. pow(int n, MathContext mc)Returns a newBigDecimalwhose value isthis<sup>n</sup>.BigDecimalBigDecimal. remainder(BigDecimal divisor)Returns a newBigDecimalwhose value isthis % divisor.BigDecimalBigDecimal. remainder(BigDecimal divisor, MathContext mc)Returns a newBigDecimalwhose value isthis % divisor.BigDecimalBigDecimal. round(MathContext mc)Returns a newBigDecimalwhose value isthis, rounded according to the passed contextmc.BigDecimalBigDecimal. scaleByPowerOfTen(int n)Returns a newBigDecimalwhose value isthis * 10<sup>n</sup>.BigDecimalBigDecimal. setScale(int newScale)Returns a newBigDecimalinstance with the specified scale.BigDecimalBigDecimal. setScale(int newScale, int roundingMode)Returns a newBigDecimalinstance with the specified scale.BigDecimalBigDecimal. setScale(int newScale, RoundingMode roundingMode)Returns a newBigDecimalinstance with the specified scale.BigDecimalBigDecimal. stripTrailingZeros()Returns a newBigDecimalinstance with the same value asthisbut with a unscaled value where the trailing zeros have been removed.BigDecimalBigDecimal. subtract(BigDecimal subtrahend)Returns a newBigDecimalwhose value isthis - subtrahend.BigDecimalBigDecimal. subtract(BigDecimal subtrahend, MathContext mc)Returns a newBigDecimalwhose value isthis - subtrahend.BigDecimalBigDecimal. ulp()Returns the unit in the last place (ULP) of thisBigDecimalinstance.static BigDecimalBigDecimal. valueOf(double val)Returns a newBigDecimalinstance whose value is equal toval.static BigDecimalBigDecimal. valueOf(long unscaledVal)Returns a newBigDecimalinstance whose value is equal tounscaledVal.static BigDecimalBigDecimal. valueOf(long unscaledVal, int scale)Returns a newBigDecimalinstance whose value is equal tounscaledVal * 10<sup>-scale</sup>).Methods in java.math with parameters of type BigDecimal Modifier and Type Method Description BigDecimalBigDecimal. add(BigDecimal augend)Returns a newBigDecimalwhose value isthis + augend.BigDecimalBigDecimal. add(BigDecimal augend, MathContext mc)Returns a newBigDecimalwhose value isthis + augend.intBigDecimal. compareTo(BigDecimal val)Compares thisBigDecimalwithval.BigDecimalBigDecimal. divide(BigDecimal divisor)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, int roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, int scale, int roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, int scale, RoundingMode roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, MathContext mc)Returns a newBigDecimalwhose value isthis / divisor.BigDecimalBigDecimal. divide(BigDecimal divisor, RoundingMode roundingMode)Returns a newBigDecimalwhose value isthis / divisor.BigDecimal[]BigDecimal. divideAndRemainder(BigDecimal divisor)Returns aBigDecimalarray which contains the integral part ofthis / divisorat index 0 and the remainderthis % divisorat index 1.BigDecimal[]BigDecimal. divideAndRemainder(BigDecimal divisor, MathContext mc)Returns aBigDecimalarray which contains the integral part ofthis / divisorat index 0 and the remainderthis % divisorat index 1.BigDecimalBigDecimal. divideToIntegralValue(BigDecimal divisor)Returns a newBigDecimalwhose value is the integral part ofthis / divisor.BigDecimalBigDecimal. divideToIntegralValue(BigDecimal divisor, MathContext mc)Returns a newBigDecimalwhose value is the integral part ofthis / divisor.BigDecimalBigDecimal. max(BigDecimal val)Returns the maximum of thisBigDecimalandval.BigDecimalBigDecimal. min(BigDecimal val)Returns the minimum of thisBigDecimalandval.BigDecimalBigDecimal. multiply(BigDecimal multiplicand)Returns a newBigDecimalwhose value isthis * multiplicand.BigDecimalBigDecimal. multiply(BigDecimal multiplicand, MathContext mc)Returns a newBigDecimalwhose value isthis * multiplicand.BigDecimalBigDecimal. remainder(BigDecimal divisor)Returns a newBigDecimalwhose value isthis % divisor.BigDecimalBigDecimal. remainder(BigDecimal divisor, MathContext mc)Returns a newBigDecimalwhose value isthis % divisor.BigDecimalBigDecimal. subtract(BigDecimal subtrahend)Returns a newBigDecimalwhose value isthis - subtrahend.BigDecimalBigDecimal. subtract(BigDecimal subtrahend, MathContext mc)Returns a newBigDecimalwhose value isthis - subtrahend. -
Uses of BigDecimal in java.sql
Methods in java.sql that return BigDecimal Modifier and Type Method Description BigDecimalCallableStatement. getBigDecimal(int parameterIndex)Returns a newBigDecimalrepresentation of the JDBCNUMERICparameter specified by the input index.BigDecimalCallableStatement. getBigDecimal(int parameterIndex, int scale)Deprecated.BigDecimalCallableStatement. getBigDecimal(String parameterName)Returns a newBigDecimalrepresentation of the JDBCNUMERICparameter specified by the input name.BigDecimalResultSet. getBigDecimal(int columnIndex)Gets the value of a column specified by column index as ajava.math.BigDecimal.BigDecimalResultSet. getBigDecimal(int columnIndex, int scale)Deprecated.UseResultSet.getBigDecimal(int)orResultSet.getBigDecimal(String)instead.BigDecimalResultSet. getBigDecimal(String columnName)Gets the value of a column specified by column name, as ajava.math.BigDecimal.BigDecimalResultSet. getBigDecimal(String columnName, int scale)Deprecated.UseResultSet.getBigDecimal(int)orResultSet.getBigDecimal(String)instead.BigDecimalSQLInput. readBigDecimal()Returns the next attribute in the stream in the form of ajava.math.BigDecimal.Methods in java.sql with parameters of type BigDecimal Modifier and Type Method Description voidCallableStatement. setBigDecimal(String parameterName, BigDecimal theBigDecimal)Sets the value of a specified parameter to a suppliedjava.math.BigDecimalvalue.voidPreparedStatement. setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)Sets the value of a specified parameter to a suppliedjava.math.BigDecimalvalue.voidResultSet. updateBigDecimal(int columnIndex, BigDecimal x)Updates a column specified by a column index with ajava.sql.BigDecimalvalue.voidResultSet. updateBigDecimal(String columnName, BigDecimal x)Updates a column specified by a column name with ajava.sql.BigDecimalvalue.voidSQLOutput. writeBigDecimal(BigDecimal theBigDecimal)Write ajava.math.BigDecimalvalue into the output stream. -
Uses of BigDecimal in java.util
Methods in java.util that return BigDecimal Modifier and Type Method Description BigDecimalScanner. nextBigDecimal()Returns the next token as aBigDecimal. -
Uses of BigDecimal in javax.sql
Methods in javax.sql with parameters of type BigDecimal Modifier and Type Method Description voidRowSet. setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)Sets the value of the specified SQLNUMERICparameter in theRowSetcommand with the data in the suppliedjava.math.BigDecimalvalue.voidRowSet. setBigDecimal(String parameterName, BigDecimal theBigDecimal)Sets the value of the specified SQL NUMERIC parameter in the RowSet command with the data in the supplied java.math.BigDecimal value. -
Uses of BigDecimal in javax.xml.datatype
Methods in javax.xml.datatype that return BigDecimal Modifier and Type Method Description abstract BigDecimalXMLGregorianCalendar. getFractionalSecond()Return fractional seconds.Methods in javax.xml.datatype with parameters of type BigDecimal Modifier and Type Method Description abstract DurationDuration. multiply(BigDecimal factor)Computes a new duration whose value isfactortimes longer than the value of this duration.abstract DurationDatatypeFactory. newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)Obtain a new instance of aDurationspecifying theDurationas isPositive, years, months, days, hours, minutes, seconds.abstract XMLGregorianCalendarDatatypeFactory. newXMLGregorianCalendar(BigInteger year, int month, int day, int hour, int minute, int second, BigDecimal fractionalSecond, int timezone)Constructor allowing for complete value spaces allowed by W3C XML Schema 1.0 recommendation for xsd:dateTime and related builtin datatypes.XMLGregorianCalendarDatatypeFactory. newXMLGregorianCalendarTime(int hours, int minutes, int seconds, BigDecimal fractionalSecond, int timezone)Create a Java instance of XML Schema builtin datatype time.abstract voidXMLGregorianCalendar. setFractionalSecond(BigDecimal fractional)Set fractional seconds.voidXMLGregorianCalendar. setTime(int hour, int minute, int second, BigDecimal fractional)Set time as one unit, including the optional infinite precision fractional seconds. -
Uses of BigDecimal in libcore.icu
Methods in libcore.icu with parameters of type BigDecimal Modifier and Type Method Description char[]NativeDecimalFormat. formatBigDecimal(BigDecimal value, FieldPosition field) -
Uses of BigDecimal in SQLite.JDBC2z
Methods in SQLite.JDBC2z that return BigDecimal Modifier and Type Method Description BigDecimalJDBCPreparedStatement. getBigDecimal(String parameterName)BigDecimalJDBCResultSet. getBigDecimal(int columnIndex)BigDecimalJDBCResultSet. getBigDecimal(int columnIndex, int scale)Deprecated.BigDecimalJDBCResultSet. getBigDecimal(String columnName)BigDecimalJDBCResultSet. getBigDecimal(String columnName, int scale)Deprecated.Methods in SQLite.JDBC2z with parameters of type BigDecimal Modifier and Type Method Description voidJDBCPreparedStatement. setBigDecimal(int parameterIndex, BigDecimal x)voidJDBCPreparedStatement. setBigDecimal(String parameterName, BigDecimal val)voidJDBCResultSet. updateBigDecimal(int colIndex, BigDecimal f)voidJDBCResultSet. updateBigDecimal(String colName, BigDecimal f)
CallableStatement.getBigDecimal(int)orCallableStatement.getBigDecimal(String)instead.