类 FormatConfig

直接已知子类:
BrowserTool, DateTool, MathTool, NumberTool

public class FormatConfig extends LocaleConfig
Implements common logic and constants for tools which allow their default format to be configured.
从以下版本开始:
VelocityTools 2.0
作者:
Nathan Bubna
  • 字段详细资料

    • DEFAULT_FORMAT

      public static final String DEFAULT_FORMAT
      The default format to be used when none is specified.
      另请参阅:
    • FORMAT_KEY

      public static final String FORMAT_KEY
      The key used for specifying a default format via tool configuration.
      另请参阅:
    • format

      private String format
  • 构造器详细资料

    • FormatConfig

      public FormatConfig()
  • 方法详细资料

    • configure

      protected void configure(ValueParser values)
      Does the actual configuration. This is protected, so subclasses may share the same ValueParser and call configure at any time, while preventing templates from doing so when configure(Map) is locked.
      覆盖:
      configure 在类中 LocaleConfig
    • getFormat

      public String getFormat()
      This returns the configured default format for this tool.
      返回:
      the default String
    • setFormat

      protected void setFormat(String format)
      Sets the default format for this instance.