Class FormattableColumnTranslator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFormat()  
      void setFormat​(java.lang.String s)
      /** Set the format to be used to "format" the object.
      protected java.lang.String toString​(java.lang.Object d)
      Format the object using String.format(String, Object...) if there is a format to apply otherwise String.valueOf(Object).
      • Methods inherited from class java.lang.Object

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

      • FormattableColumnTranslator

        public FormattableColumnTranslator()
      • FormattableColumnTranslator

        public FormattableColumnTranslator​(java.lang.String format)
    • Method Detail

      • getFormat

        public java.lang.String getFormat()
      • toString

        protected java.lang.String toString​(java.lang.Object d)
        Format the object using String.format(String, Object...) if there is a format to apply otherwise String.valueOf(Object).
        Parameters:
        d - the object to format.
      • setFormat

        public void setFormat​(java.lang.String s)
        /** Set the format to be used to "format" the object.

        If non-null then this will be used to format the column value; it relies exclusively on Formatter via String.format(String, Object...) to format it into something meaningful. Note that no validation is performed on the output or format; as a result runtime exceptions may be thrown.

        Parameters:
        s - the format to apply.
        See Also:
        Formatter