Class FormatSpecification


  • public class FormatSpecification
    extends Object
    The FormatSpecification classifies a format string into the 4 known classes of format-strings of Java. This is used by the Excel-export to transform the raw-formatstring into a suitable cell-format.

    This class is plain value-carrier. It is mutable and should not be used outside the scope of querying raw-datasources.

    Author:
    : Thomas Morgner
    • Field Detail

      • TYPE_UNDEFINED

        public static final int TYPE_UNDEFINED
        A constant declaring that the format-type cannot be determined in a reliable way.
        See Also:
        Constant Field Values
      • TYPE_DATE_FORMAT

        public static final int TYPE_DATE_FORMAT
        A constant declaring that the format-type is a simple date-format.
        See Also:
        Constant Field Values
      • TYPE_DECIMAL_FORMAT

        public static final int TYPE_DECIMAL_FORMAT
        A constant declaring that the format-type is a decimal-format.
        See Also:
        Constant Field Values
      • TYPE_MESSAGE_FORMAT

        public static final int TYPE_MESSAGE_FORMAT
        A constant declaring that the format-type is a message-format.
        See Also:
        Constant Field Values
      • TYPE_CHOICE_FORMAT

        public static final int TYPE_CHOICE_FORMAT
        A constant declaring that the format-type is a choice-format.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FormatSpecification

        public FormatSpecification()
        Creates an empty object. This object must be filled with valid values by calling redefine(int, String) later.
    • Method Detail

      • redefine

        public void redefine​(int type,
                             String formatString)
        Redefines the values stored in this specification object.
        Parameters:
        type - the type, one of the constants declared in this class.
        formatString - the format string.
      • getType

        public int getType()
        Returns the type of the format string contained in this class.
        Returns:
        the type.
      • getFormatString

        public String getFormatString()
        Returns the raw-format-string.
        Returns:
        the format string.