Package io.deephaven.util.type
Class NumericTypeUtils
java.lang.Object
io.deephaven.util.type.NumericTypeUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisBigNumeric(Class<?> type) Whether the class is aBigIntegerorBigDecimalstatic booleanisBoxedNumeric(@NotNull Class<?> c) Whether the class is an instance ofNumber.static booleanWhether the class is equal to the char/ Character types.static booleanWhether the class is equal to one of the 2 float primitives: float, double.static booleanisIntegral(@NotNull Class<?> c) Whether the class is equal to one of the 4 integral types: int, long, short, or byte.static booleanisIntegralOrChar(@NotNull Class<?> c) Whether the class is an integral or char.static booleanWhether the class isisPrimitiveNumeric(Class)orisBoxedNumeric(Class)static booleanisPrimitiveNumeric(@NotNull Class<?> c) Whether the class is equal to one of the six numeric primitives: float, double, int, long, short, or byte.
-
Method Details
-
isBoxedNumeric
Whether the class is an instance ofNumber.- Parameters:
c- class- Returns:
- true if Number.class is assignable from
c, false otherwise
-
isNumeric
Whether the class isisPrimitiveNumeric(Class)orisBoxedNumeric(Class)- Parameters:
c- class- Returns:
- true if
cis numeric, false otherwise
-
isBigNumeric
Whether the class is aBigIntegerorBigDecimal- Parameters:
type- the class- Returns:
- true if the type is BigInteger or BigDecimal, false otherwise
-
isChar
Whether the class is equal to the char/ Character types.- Parameters:
c- class- Returns:
- true if
cis a numeric primitive, false otherwise
-
isIntegral
Whether the class is equal to one of the 4 integral types: int, long, short, or byte.- Parameters:
c- class- Returns:
- true if
cis a numeric primitive, false otherwise
-
isFloat
Whether the class is equal to one of the 2 float primitives: float, double.- Parameters:
c- class- Returns:
- true if
cis a numeric primitive, false otherwise
-
isIntegralOrChar
Whether the class is an integral or char.- Parameters:
c- class- Returns:
- true if
cis a numeric primitive, false otherwise
-
isPrimitiveNumeric
Whether the class is equal to one of the six numeric primitives: float, double, int, long, short, or byte.- Parameters:
c- class- Returns:
- true if
cis a numeric primitive, false otherwise
-