Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7088952

Add "BYTES" constant to primitive wrapper classes

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 8
    • 8
    • core-libs
    • b66
    • generic
    • generic
    • Verified

    Description

      Add a BYTES constant to each of the primitive wrapper types. The SIZE value provided with primitive types is expresses the size of the type in bits. Frequently the size of a type in bytes is needed as bytes are the smallest unit of allocation. The most frequent use of the SIZE constant is to determine the size in in bytes for a type via (type).SIZE / Byte.SIZE

      This change adds a constant BYTES to each of the primitive wrapper classes (Byte, Character, Double, Float, Integer, Long, Short) with the calculation (type).SIZE / Byte.SIZE already made.

      Attachments

        Issue Links

          Activity

            People

              mduigou Mike Duigou
              mduigou Mike Duigou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: