Class BasicChronology.HalfdayField

    • Constructor Detail

      • HalfdayField

        HalfdayField()
    • 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
      • set

        public long set​(long millis,
                        java.lang.String text,
                        java.util.Locale locale)
        Description copied from class: BaseDateTimeField
        Sets a value in the milliseconds supplied from a human-readable, text value. If the specified locale is null, the default locale is used.

        This implementation uses convertText(String, Locale) and BaseDateTimeField.set(long, int).

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

        Overrides:
        set in class BaseDateTimeField
        Parameters:
        millis - the milliseconds from 1970-01-01T00:00:00Z to set in
        text - the text value to set
        locale - the locale to use for selecting a text symbol, null for default
        Returns:
        the updated milliseconds
      • 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