io.sarl.lang.core.scoping.extensions.numbers.cast
Class NumberCastExtensions
final class NumberCastExtensions
extends java.lang.Object
Provide static functions related to the casting of numbers of type Number.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
core
Since:
0.7
See:
"https://github.com/eclipse/xtext-extras/issues/186"
Action Summary
Modifier and type Action and description
static com.google.common.util.concurrent.AtomicDouble toAtomicDouble(Number)
Convert the given value to AtomicInteger.
static java.util.concurrent.atomic.AtomicInteger toAtomicInteger(Number)
Convert the given value to AtomicInteger.
static java.util.concurrent.atomic.AtomicLong toAtomicLong(Number)
Convert the given value to AtomicLong.
static java.math.BigDecimal toBigDecimal(Number)
Convert the given value to BigDecimal.
static java.math.BigInteger toBigInteger(Number)
Convert the given value to BigInteger.
static java.lang.Byte toByte(Number)
Convert the given value to Byte.
static java.lang.Double toDouble(Number)
Convert the given value to Double.
static java.lang.Float toFloat(Number)
Convert the given value to Float.
static java.lang.Integer toInteger(Number)
Convert the given value to Integer.
static java.lang.Long toLong(Number)
Convert the given value to Long.
static java.lang.Short toShort(Number)
Convert the given value to Short.
Action Details
toAtomicDouble(Number)
def toAtomicDouble(Number) : com.google.common.util.concurrent.AtomicDouble
Convert the given value to AtomicInteger. This function is not null-safe.
Parameters:
number - a number of Number type.
Returns:
the equivalent value to number of AtomicInteger type.
toAtomicInteger(Number)
def toAtomicInteger(Number) : java.util.concurrent.atomic.AtomicInteger
Convert the given value to AtomicInteger. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of AtomicInteger type.
toAtomicLong(Number)
def toAtomicLong(Number) : java.util.concurrent.atomic.AtomicLong
Convert the given value to AtomicLong. This function is not null-safe.
Parameters:
number - a number of Byte type.
Returns:
the equivalent value to number of AtomicLong type.
toBigDecimal(Number)
def toBigDecimal(Number) : java.math.BigDecimal
Convert the given value to BigDecimal. This function is not null-safe.
Parameters:
number - a number of Number type.
Returns:
the equivalent value to number of BigDecimal type.
toBigInteger(Number)
def toBigInteger(Number) : java.math.BigInteger
Convert the given value to BigInteger. This function is not null-safe.
Parameters:
number - a number of Number type.
Returns:
the equivalent value to number of BigInteger type.
toByte(Number)
def toByte(Number) : java.lang.Byte
Convert the given value to Byte. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of Byte type.
toDouble(Number)
def toDouble(Number) : java.lang.Double
Convert the given value to Double. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of Double type.
toFloat(Number)
def toFloat(Number) : java.lang.Float
Convert the given value to Float. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of Float type.
toInteger(Number)
def toInteger(Number) : java.lang.Integer
Convert the given value to Integer. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of Integer type.
toLong(Number)
def toLong(Number) : java.lang.Long
Convert the given value to Long. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of Long type.
toShort(Number)
def toShort(Number) : java.lang.Short
Convert the given value to Short. This function is not null-safe.
Parameters:
number - a number.
Returns:
the equivalent value to number of Short type.