Class FormatSettings<T>

  • Type Parameters:
    T - the type of value to which the settings apply
    All Implemented Interfaces:
    org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class FormatSettings<T>
    extends Object
    implements org.joda.beans.ImmutableBean
    Contains formatting settings for a specific type.
    • Method Detail

      • of

        public static <T> FormatSettings<T> of​(FormatCategory category,
                                               ValueFormatter<T> formatter)
        Obtains settings from category and formatter.
        Type Parameters:
        T - the type of the value
        Parameters:
        category - the category of the type
        formatter - the formatter the use for the type
        Returns:
        the format settings
      • meta

        public static FormatSettings.Meta meta()
        The meta-bean for FormatSettings.
        Returns:
        the meta-bean, not null
      • metaFormatSettings

        public static <R> FormatSettings.Meta<R> metaFormatSettings​(Class<R> cls)
        The meta-bean for FormatSettings.
        Type Parameters:
        R - the bean's generic type
        Parameters:
        cls - the bean's generic type
        Returns:
        the meta-bean, not null
      • metaBean

        public FormatSettings.Meta<T> metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getCategory

        public FormatCategory getCategory()
        Gets the category of this type.
        Returns:
        the value of the property, not null
      • getFormatter

        public ValueFormatter<T> getFormatter()
        Gets the formatter to use to convert this type into a string.
        Returns:
        the value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object