Class PrimitiveAnalysis


  • public class PrimitiveAnalysis
    extends java.lang.Object
    Some utilities for dealing with autoboxing and unboxing Reference: https://docs.oracle.com/javase/tutorial/java/data/autoboxing.html
    Author:
    Ben Holland
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.ensoftcorp.atlas.core.db.graph.Node autobox​(com.ensoftcorp.atlas.core.db.graph.Node primitiveType)
      Converts a primitive type to the boxed object equivalent
      static boolean isBoxablePrimitiveType​(com.ensoftcorp.atlas.core.db.graph.Node type)
      Returns true if the given type is a primitive or primitive object type
      static com.ensoftcorp.atlas.core.db.graph.Node unbox​(com.ensoftcorp.atlas.core.db.graph.Node wrapperType)
      Converts a primitive wrapper object type to the unboxed primitive equivalent
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isBoxablePrimitiveType

        public static boolean isBoxablePrimitiveType​(com.ensoftcorp.atlas.core.db.graph.Node type)
        Returns true if the given type is a primitive or primitive object type
        Parameters:
        primitiveType -
        Returns:
      • autobox

        public static com.ensoftcorp.atlas.core.db.graph.Node autobox​(com.ensoftcorp.atlas.core.db.graph.Node primitiveType)
        Converts a primitive type to the boxed object equivalent
        Parameters:
        primitiveType -
        Returns:
      • unbox

        public static com.ensoftcorp.atlas.core.db.graph.Node unbox​(com.ensoftcorp.atlas.core.db.graph.Node wrapperType)
        Converts a primitive wrapper object type to the unboxed primitive equivalent
        Parameters:
        primitiveType -
        Returns: