Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-756

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1
    • lang.*
    • None

    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)
      

      Attachments

        Activity

          People

            ggregory Gary D. Gregory
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: