Class GJDayOfWeekDateTimeField


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

      • 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 java.lang.String getAsText​(int fieldValue,
                                          java.util.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 java.lang.String getAsShortText​(int fieldValue,
                                               java.util.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​(java.lang.String text,
                                  java.util.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:
        java.lang.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
      • 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​(java.util.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​(java.util.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 java.lang.Object readResolve()
        Serialization singleton