Class GJDayOfWeekDateTimeField


final class GJDayOfWeekDateTimeField extends PreciseDurationDateTimeField
GJDayOfWeekDateTimeField provides time calculations for the day of the week component of time.
Since:
1.0
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public int get(long instant)
      Get the value of the specified time instant.
      Specified by:
      get in class BaseDateTimeField
      Parameters:
      instant - the time instant in millis to query
      Returns:
      the day of the week extracted from the input
    • getAsText

      public String getAsText(int fieldValue, Locale locale)
      Get the textual value of the specified time instant.
      Overrides:
      getAsText in class BaseDateTimeField
      Parameters:
      fieldValue - the field value to query
      locale - the locale to use
      Returns:
      the day of the week, such as 'Monday'
    • getAsShortText

      public String getAsShortText(int fieldValue, Locale locale)
      Get the abbreviated textual value of the specified time instant.
      Overrides:
      getAsShortText in class BaseDateTimeField
      Parameters:
      fieldValue - the field value to query
      locale - the locale to use
      Returns:
      the day of the week, such as 'Mon'
    • convertText

      protected int convertText(String text, Locale locale)
      Convert the specified text and locale into a value.
      Overrides:
      convertText in class BaseDateTimeField
      Parameters:
      text - the text to convert
      locale - the locale to convert using
      Returns:
      the value extracted from the text
      Throws:
      IllegalArgumentException - if the text is invalid
    • getRangeDurationField

      public DurationField getRangeDurationField()
      Description copied from class: BaseDateTimeField
      Returns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day.
      Specified by:
      getRangeDurationField in class BaseDateTimeField
      Returns:
      the range duration of this field, or null if field has no range
    • getMinimumValue

      public int getMinimumValue()
      Get the minimum value that this field can have.
      Overrides:
      getMinimumValue in class PreciseDurationDateTimeField
      Returns:
      the field's minimum value
    • getMaximumValue

      public int getMaximumValue()
      Get the maximum value that this field can have.
      Specified by:
      getMaximumValue in class BaseDateTimeField
      Returns:
      the field's maximum value
    • getMaximumTextLength

      public int getMaximumTextLength(Locale locale)
      Get the maximum length of the text returned by this field.
      Overrides:
      getMaximumTextLength in class BaseDateTimeField
      Parameters:
      locale - the locale to use
      Returns:
      the maximum textual length
    • getMaximumShortTextLength

      public int getMaximumShortTextLength(Locale locale)
      Get the maximum length of the abbreviated text returned by this field.
      Overrides:
      getMaximumShortTextLength in class BaseDateTimeField
      Parameters:
      locale - the locale to use
      Returns:
      the maximum abbreviated textual length
    • readResolve

      private Object readResolve()
      Serialization singleton