Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2511

Use ULong instead of BigInteger as representation of xs:unsignedLong type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.0
    • None
    • Back End
    • None

    Description

      We represent unsigned integer types using the next larger sized signed integer. Ex: so xs:unsignedByte is represented by a Short, etc.

      This works except for xs:unsignedLong. There is no next bigger type. Instead we use a BigInteger to represent an xs:unsignedLong.

      All of that predates adding the ULong library to Daffodil. ULong behaves as an unsigned long, but represents itself as a signed long. This is much more efficient and generally a better idea than using BigInteger.

      Similarly, we could use UInt, UShort and UByte as the representations of all the unsigned types for uniformity.

      Direct support for these would need to be added to DataValue.

      One thing to consider, and it may not matter, is that ULong and friends aren't subtypes of java.lang.Number, where all the other boxed number types we use are. 

      A search for java.lang.Number makes sense as a starting point.  There are some places that use java.lang.Number specifically.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: