Commons Lang
  1. Commons Lang
  2. LANG-756

Add APIs ClassUtils.isPrimitiveWrapper(Class<?>) and isPrimitiveOrWrapper(Class<?>)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1
    • Component/s: lang.*
    • Labels:
      None
    • Environment:

      Description

          /**
           * Returns whether the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
           * {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
           * 
           * @param type
           *            The class to query or null.
           * @return true if the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
           *         {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
           */
          public static boolean isPrimitiveOrWrapper(Class<?> type)
      
          /**
           * Returns whether the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character}, {@link Short},
           * {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
           * 
           * @param type
           *            The class to query or null.
           * @return true if the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character}, {@link Short},
           *         {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
           */
          public static boolean isPrimitiveWrapper(Class<?> type)
      

        Activity

        Gary Gregory created issue -
        Gary Gregory made changes -
        Field Original Value New Value
        Summary Add API ClassUtils.isPrimitiveWrapper(Class<?>) Add APIs ClassUtils.isPrimitiveWrapper(Class<?>) and isPrimitiveOrWrapper(Class<?>)
        Description {code:java}
           /**
             * Returns whether the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character}, {@link Short},
             * {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
             *
             * @param type
             * The class to query or null.
             * @return true if the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character}, {@link Short},
             * {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
             */
            public static boolean isPrimitiveWrapper(Class<?> type)
        {code}
        {code:java}
            /**
             * Returns whether the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
             * {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
             *
             * @param type
             * The class to query or null.
             * @return true if the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
             * {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
             */
            public static boolean isPrimitiveOrWrapper(Class<?> type)

            /**
             * Returns whether the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character}, {@link Short},
             * {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
             *
             * @param type
             * The class to query or null.
             * @return true if the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character}, {@link Short},
             * {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
             */
            public static boolean isPrimitiveWrapper(Class<?> type)
        {code}
        Hide
        Gary Gregory added a comment -

        In SVN.

        Show
        Gary Gregory added a comment - In SVN.
        Gary Gregory made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        26m 4s 1 Gary Gregory 23/Sep/11 01:48
        Resolved Resolved Closed Closed
        47d 3h 28m 1 Henri Yandell 09/Nov/11 04:16

          People

          • Assignee:
            Gary Gregory
            Reporter:
            Gary Gregory
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development