Class ConversionTools


  • public class ConversionTools
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ConversionTools()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String addLeadingZerosToNumericID​(java.lang.String inputString, int desiredLength)
      Method adds leading zeros to a numeric string based on a specified total length
      protected java.lang.String convertProductCode​(java.lang.String ProductCode)
      Converted the product code to the internal format.
      static java.lang.Long convertQuantityToNumber​(java.lang.String quantity)
      Since the format of the quantity is xxx,yyy we need to reparse the string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConversionTools

        public ConversionTools()
    • Method Detail

      • addLeadingZerosToNumericID

        public static java.lang.String addLeadingZerosToNumericID​(java.lang.String inputString,
                                                                  int desiredLength)
        Method adds leading zeros to a numeric string based on a specified total length
        Parameters:
        inputString - contains the numeric String
        desiredLength - specifies the total desired length of the string
        Returns:
        String with leading zeroes appended
      • convertQuantityToNumber

        public static java.lang.Long convertQuantityToNumber​(java.lang.String quantity)
        Since the format of the quantity is xxx,yyy we need to reparse the string. Format of quantity: [+|-][0123456789]{1,13}\{DecimalPoint}[0123456789]{3} DecimalPoint: {.|,} depending on Locale.
      • convertProductCode

        protected java.lang.String convertProductCode​(java.lang.String ProductCode)
        Converted the product code to the internal format. For numeric product ID, add leading zeros so that the length of the product ID becomes 18 decimal digits. For non-numeric product ID, do not do any change.
        Parameters:
        ProductCode -
        Returns:
        Formatted product code