java.lang.Object
org.freedesktop.dbus.utils.PrimitiveUtils
Utility class containing methods dealing with object and primitive class types.
- Since:
- 5.1.1 - 2024-09-15
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap with all primitives and the corresponding wrapper type.Map with all wrapper types and the corresponding primitive.static booleanisCompatiblePrimitiveOrWrapper(Class<?> _clz1, Class<?> _clz2) Check if the given classes are equal or are equal wrapper types (e.g.
-
Field Details
-
PRIMITIVE_TO_WRAPPER
-
WRAPPER_TO_PRIMITIVE
-
-
Constructor Details
-
PrimitiveUtils
private PrimitiveUtils()
-
-
Method Details
-
getPrimitiveToWrapperTypes
Map with all primitives and the corresponding wrapper type.- Returns:
- unmodifiable map
-
getWrapperToPrimitiveTypes
Map with all wrapper types and the corresponding primitive.- Returns:
- unmodifiable map
-
isCompatiblePrimitiveOrWrapper
Check if the given classes are equal or are equal wrapper types (e.g. byte == Byte).- Parameters:
_clz1-_clz2-- Returns:
- true if classes equal or both of compatible (wrapper) types, false otherwise or if any parameter is null
-