Class FastDateFormat.TimeZoneNameRule

java.lang.Object
org.apache.commons.lang.time.FastDateFormat.TimeZoneNameRule
All Implemented Interfaces:
FastDateFormat.Rule
Enclosing class:
FastDateFormat

private static class FastDateFormat.TimeZoneNameRule extends Object implements FastDateFormat.Rule

Inner class to output a time zone name.

  • Field Details

    • mTimeZone

      private final TimeZone mTimeZone
    • mTimeZoneForced

      private final boolean mTimeZoneForced
    • mLocale

      private final Locale mLocale
    • mStyle

      private final int mStyle
    • mStandard

      private final String mStandard
    • mDaylight

      private final String mDaylight
  • Constructor Details

    • TimeZoneNameRule

      TimeZoneNameRule(TimeZone timeZone, boolean timeZoneForced, Locale locale, int style)
      Constructs an instance of TimeZoneNameRule with the specified properties.
      Parameters:
      timeZone - the time zone
      timeZoneForced - if true the time zone is forced into standard and daylight
      locale - the locale
      style - the style
  • Method Details

    • estimateLength

      public int estimateLength()
      Returns the estimated lentgh of the result.
      Specified by:
      estimateLength in interface FastDateFormat.Rule
      Returns:
      the estimated length
    • appendTo

      public void appendTo(StringBuffer buffer, Calendar calendar)
      Appends the value of the specified calendar to the output buffer based on the rule implementation.
      Specified by:
      appendTo in interface FastDateFormat.Rule
      Parameters:
      buffer - the output buffer
      calendar - calendar to be appended