Class Format

java.lang.Object
com.softwaremining.wrappers.format.Format
Direct Known Subclasses:
AbstractNumericFormat, AlphaNumericFormat

public abstract class Format extends Object
  • Field Details

    • totalRuntime_getInstance

      public static long totalRuntime_getInstance
    • totalRuntime_convertFromDisplayToStorage

      public static long totalRuntime_convertFromDisplayToStorage
    • justifiedRight

      protected boolean justifiedRight
    • additionalParamsPostfixesMap

      protected static HashMap<Integer,String> additionalParamsPostfixesMap
  • Constructor Details

    • Format

      protected Format(char[] picture)
      constructor
      Parameters:
      picture -
  • Method Details

    • getPicture

      public char[] getPicture()
    • convertFromDisplayToStorage

      public final String convertFromDisplayToStorage(Object value, boolean[] sizeError)
      format a value according to the PIC definition
    • convertFromDisplayToStorage

      public abstract String convertFromDisplayToStorage(String value, boolean[] sizeError)
      format a value according to the PIC definition
    • convertFromDisplayToStorage

      public String convertFromDisplayToStorage(String value)
      format a value according to the PIC definition
    • convertFromDisplayToStorage

      protected abstract String convertFromDisplayToStorage(double value, boolean[] sizeError)
      format a value according to the PIC definition
    • convertFromDisplayToStorage

      public String convertFromDisplayToStorage(double value)
    • convertFromDisplayToStorage

      public String convertFromDisplayToStorage(long value, boolean[] sizeError)
      format a value according to the PIC definition
    • convertFromDisplayToStorage

      public abstract String convertFromDisplayToStorage(BigDecimal value, boolean[] sizeError)
    • convertFromDisplayToStorage

      public abstract String convertFromDisplayToStorage(BigInteger value, boolean[] sizeError)
    • convertFromStorageToDisplayFormat

      public abstract String convertFromStorageToDisplayFormat(String formattedString)
    • getStorageCellSize

      public abstract int getStorageCellSize()
      This is the number of characters in field.
      For example, PIC X(10) will have 10 characters
      or PIC 9(16) will have 16 characters
      but PIC 9(16) COMP-3 will have 8 characters
      Returns:
      cellsize
    • isCompressed

      public abstract boolean isCompressed()
    • getSQLObject

      public abstract Object getSQLObject(String formattedString)
    • getInstance

      public static Format getInstance(char[] picture, int additionalParam)
    • getInstance

      public static Format getInstance(String picture, int additionalParam)
    • getAllFormatInstances

      protected static Collection<Format> getAllFormatInstances()
    • assignJustifiedRight

      public final void assignJustifiedRight(boolean justifiedRight)
    • isJustifiedRight

      public final boolean isJustifiedRight()
    • getNumberOfDigits

      public abstract int getNumberOfDigits()
      Returns the number of integer digits of used for Integer and Decimal parts of a number. For example, given a definition of S9(5)v9(3); the NumberOfDigists is 11.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object