public class IntegerUtil extends Object
Primitives |
|---|
| Byte |
| Short |
| Int |
| Long |
| Float |
| Double |
Immutables |
|---|
| BigInteger |
| BigDecimal |
| Constructor and Description |
|---|
IntegerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal[] |
toBigDecimalArray(List<Integer> list)
Converts a list of integers to an array of BigDecimals.
|
static List<BigDecimal> |
toBigDecimalList(List<Integer> list)
Converts a list of integers to a list of BigDecimals.
|
static BigInteger[] |
toBigIntArray(List<Integer> list)
Converts a list of integers to an array of BigIntegers.
|
static List<BigInteger> |
toBigIntList(List<Integer> list)
Converts a list of integers to a list of BigIntegers.
|
static byte[] |
toByteArray(List<Integer> list)
Converts a list of integers to an array of bytes.
|
static List<Byte> |
toByteList(List<Integer> list)
Converts a list of integers to a list of bytes.
|
static double[] |
toDoubleArray(List<Integer> list)
Converts a list of integers to an array of doubles.
|
static List<Double> |
toDoubleList(List<Integer> list)
Converts a list of integers to a list of doubles.
|
static float[] |
toFloatArray(List<Integer> list)
Converts a list of integers to an array of floats.
|
static List<Float> |
toFloatList(List<Integer> list)
Converts a list of integers to a list of floats.
|
static int |
toInteger(Number number)
Safely converts a number to an integer.
|
static int |
toInteger(Object obj)
Safely converts a number to an integer.
|
static int[] |
toIntegerArray(List<Integer> list)
Converts a list of integers to an array of integers.
|
static List<Integer> |
toIntegerList(Collection<Number> collection)
Converts a collection of numbers to a list of integers.
|
static long[] |
toLongArray(List<Integer> list)
Converts a list of integers to an array of longs.
|
static List<Long> |
toLongList(List<Integer> list)
Converts a list of integers to a list of longs.
|
static short[] |
toShortArray(List<Integer> list)
Converts a list of integers to an array of shorts.
|
static List<Short> |
toShortList(List<Integer> list)
Converts a list of integers to a list of shorts.
|
public static int toInteger(Number number)
Number - number to parseArithmeticException - on overflowpublic static int toInteger(Object obj)
Object - number to parseArithmeticException - on overflowpublic static List<Byte> toByteList(List<Integer> list)
List - list of integerspublic static byte[] toByteArray(List<Integer> list)
List - list of integerspublic static List<Short> toShortList(List<Integer> list)
List - list of integerspublic static short[] toShortArray(List<Integer> list)
List - list of integerspublic static List<Integer> toIntegerList(Collection<Number> collection)
Collection - the collectionpublic static int[] toIntegerArray(List<Integer> list)
List - list of integerspublic static List<Long> toLongList(List<Integer> list)
List - list of integerspublic static long[] toLongArray(List<Integer> list)
List - list of longspublic static List<Float> toFloatList(List<Integer> list)
List - list of integerspublic static float[] toFloatArray(List<Integer> list)
List - list of integerspublic static List<Double> toDoubleList(List<Integer> list)
List - the list of integerspublic static double[] toDoubleArray(List<Integer> list)
List - list of integerspublic static List<BigInteger> toBigIntList(List<Integer> list)
List - list of integerspublic static BigInteger[] toBigIntArray(List<Integer> list)
List - list of integerspublic static List<BigDecimal> toBigDecimalList(List<Integer> list)
List - list of integerspublic static BigDecimal[] toBigDecimalArray(List<Integer> list)
List - list of integersCopyright © 2017. All rights reserved.