Class GJMonthOfYearDateTimeField


  • final class GJMonthOfYearDateTimeField
    extends BasicMonthOfYearDateTimeField
    Provides time calculations for the month of the year component of time.
    Since:
    1.0
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serialization version
        See Also:
        Constant Field Values
    • Constructor Detail

      • GJMonthOfYearDateTimeField

        GJMonthOfYearDateTimeField​(BasicChronology chronology)
        Restricted constructor
    • Method Detail

      • getAsText

        public java.lang.String getAsText​(int fieldValue,
                                          java.util.Locale locale)
        Description copied from class: BaseDateTimeField
        Get the human-readable, text value of this field from the field value. If the specified locale is null, the default locale is used.

        The default implementation returns Integer.toString(get(instant)).

        Note: subclasses that override this method should also override getMaximumTextLength.

        Overrides:
        getAsText in class BaseDateTimeField
        Parameters:
        fieldValue - the numeric value to convert to text
        locale - the locale to use for selecting a text symbol, null for default
        Returns:
        the text value of the field
      • getAsShortText

        public java.lang.String getAsShortText​(int fieldValue,
                                               java.util.Locale locale)
        Description copied from class: BaseDateTimeField
        Get the human-readable, short text value of this field from the field value. If the specified locale is null, the default locale is used.

        The default implementation returns getAsText(fieldValue, locale).

        Note: subclasses that override this method should also override getMaximumShortTextLength.

        Overrides:
        getAsShortText in class BaseDateTimeField
        Parameters:
        fieldValue - the numeric value to convert to text
        locale - the locale to use for selecting a text symbol, null for default
        Returns:
        the text value of the field
      • convertText

        protected int convertText​(java.lang.String text,
                                  java.util.Locale locale)
        Description copied from class: BaseDateTimeField
        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
      • getMaximumTextLength

        public int getMaximumTextLength​(java.util.Locale locale)
        Description copied from class: BaseDateTimeField
        Get the maximum text value for this field. The default implementation returns the equivalent of Integer.toString(getMaximumValue()).length().
        Overrides:
        getMaximumTextLength in class BaseDateTimeField
        Parameters:
        locale - the locale to use for selecting a text symbol
        Returns:
        the maximum text length
      • getMaximumShortTextLength

        public int getMaximumShortTextLength​(java.util.Locale locale)
        Description copied from class: BaseDateTimeField
        Get the maximum short text value for this field. The default implementation returns getMaximumTextLength().
        Overrides:
        getMaximumShortTextLength in class BaseDateTimeField
        Parameters:
        locale - the locale to use for selecting a text symbol
        Returns:
        the maximum short text length