Class PrimitiveUtils

java.lang.Object
org.freedesktop.dbus.utils.PrimitiveUtils

public final class PrimitiveUtils extends Object
Utility class containing methods dealing with object and primitive class types.
Since:
5.1.1 - 2024-09-15
Author:
hypfvieh
  • Method Details

    • getPrimitiveToWrapperTypes

      public static Map<Class<?>,Class<?>> getPrimitiveToWrapperTypes()
      Map with all primitives and the corresponding wrapper type.
      Returns:
      unmodifiable map
    • getWrapperToPrimitiveTypes

      public static Map<Class<?>,Class<?>> getWrapperToPrimitiveTypes()
      Map with all wrapper types and the corresponding primitive.
      Returns:
      unmodifiable map
    • isCompatiblePrimitiveOrWrapper

      public static boolean isCompatiblePrimitiveOrWrapper(Class<?> _clz1, Class<?> _clz2)
      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