Package org.kie.pmml.api.utils
Class PrimitiveBoxedUtils
- java.lang.Object
-
- org.kie.pmml.api.utils.PrimitiveBoxedUtils
-
public class PrimitiveBoxedUtils extends Object
Utility 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(Class<?> a, Class<?> b)Returnstrueif one of the givenClass<?static Optional<PrimitiveBoxedUtils.PrimitiveBoxed>getKiePMMLPrimitiveBoxed(Class<?> c)
-
-
-
Method Detail
-
getKiePMMLPrimitiveBoxed
public static Optional<PrimitiveBoxedUtils.PrimitiveBoxed> getKiePMMLPrimitiveBoxed(Class<?> c)
-
areSameWithBoxing
public static boolean areSameWithBoxing(Class<?> a, 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:
-
-