Package org.kie.pmml.api.utils
Class PrimitiveBoxedUtils
- java.lang.Object
-
- org.kie.pmml.api.utils.PrimitiveBoxedUtils
-
public class PrimitiveBoxedUtils extends java.lang.ObjectUtility class to map a primitive with its boxed equivalent. Needed to avoid reflection at runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrimitiveBoxedUtils.PrimitiveBoxed
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanareSameWithBoxing(java.lang.Class<?> a, java.lang.Class<?> b)Returnstrueif one of the givenClass<?static java.util.Optional<PrimitiveBoxedUtils.PrimitiveBoxed>getKiePMMLPrimitiveBoxed(java.lang.Class<?> c)
-
-
-
Method Detail
-
getKiePMMLPrimitiveBoxed
public static java.util.Optional<PrimitiveBoxedUtils.PrimitiveBoxed> getKiePMMLPrimitiveBoxed(java.lang.Class<?> c)
-
areSameWithBoxing
public static boolean areSameWithBoxing(java.lang.Class<?> a, java.lang.Class<?> b)Returnstrueif one of the givenClass<?>is a primitive or boxed of aKiePMMLPrimitiveBoxedand the otherClass<?>is the boxed/unboxed counterpart of the sameKiePMMLPrimitiveBoxedOR the same one. Returnsfalseotherwise. Please note it returnsfalseeven if both classes areequalsbut are not a found betweenKIE_PMML_PRIMITIVE_BOXEDS- Parameters:
a-b-- Returns:
-
-