Class FormatSettings<T>

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

    public final class FormatSettings<T>
    extends java.lang.Object
    implements 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​(java.lang.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
      • 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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object