Class PrimitiveObjects


  • class PrimitiveObjects
    extends java.lang.Object

    This converts primitive values to their Object counterparts. For bytes and chars, values from 0 to 255 are cached. For shorts, ints, and longs, values -1000 to 1000 are cached.

    • Field Detail

      • BYTE_LOWER_BOUND

        static int BYTE_LOWER_BOUND
      • BYTE_UPPER_BOUND

        static int BYTE_UPPER_BOUND
      • CHARACTER_LOWER_BOUND

        static int CHARACTER_LOWER_BOUND
      • CHARACTER_UPPER_BOUND

        static int CHARACTER_UPPER_BOUND
      • SHORT_LOWER_BOUND

        static int SHORT_LOWER_BOUND
      • SHORT_UPPER_BOUND

        static int SHORT_UPPER_BOUND
      • INTEGER_LOWER_BOUND

        static int INTEGER_LOWER_BOUND
      • INTEGER_UPPER_BOUND

        static int INTEGER_UPPER_BOUND
      • LONG_LOWER_BOUND

        static int LONG_LOWER_BOUND
      • LONG_UPPER_BOUND

        static int LONG_UPPER_BOUND
      • mBytes

        static java.lang.Byte[] mBytes
      • mCharacters

        static java.lang.Character[] mCharacters
      • mShorts

        static java.lang.Short[] mShorts
      • mIntegers

        static java.lang.Integer[] mIntegers
      • mLongs

        static java.lang.Long[] mLongs
    • Constructor Detail

      • PrimitiveObjects

        PrimitiveObjects()
    • Method Detail

      • getBoolean

        public static java.lang.Boolean getBoolean​(boolean pValue)
      • getByte

        public static java.lang.Byte getByte​(byte pValue)
      • getCharacter

        public static java.lang.Character getCharacter​(char pValue)
      • getShort

        public static java.lang.Short getShort​(short pValue)
      • getInteger

        public static java.lang.Integer getInteger​(int pValue)
      • getLong

        public static java.lang.Long getLong​(long pValue)
      • getFloat

        public static java.lang.Float getFloat​(float pValue)
      • getDouble

        public static java.lang.Double getDouble​(double pValue)
      • getPrimitiveObjectClass

        public static java.lang.Class getPrimitiveObjectClass​(java.lang.Class pClass)
        If the given class is a primitive class, returns the object version of that class. Otherwise, the class is just returned.
      • createBytes

        static java.lang.Byte[] createBytes()
      • createCharacters

        static java.lang.Character[] createCharacters()
      • createShorts

        static java.lang.Short[] createShorts()
      • createIntegers

        static java.lang.Integer[] createIntegers()
      • createLongs

        static java.lang.Long[] createLongs()