Class BeanFieldSingleValue<T,​I>

  • Type Parameters:
    T - The type of the bean being populated
    I - Type of the index into a multivalued field
    All Implemented Interfaces:
    BeanField<T,​I>
    Direct Known Subclasses:
    BeanFieldJoin

    public class BeanFieldSingleValue<T,​I>
    extends AbstractBeanField<T,​I>
    This class concerns itself with handling single-valued bean fields.
    Since:
    4.2
    Author:
    Andrew Rucker Jones
    • Field Detail

      • capture

        protected final java.util.regex.Pattern capture
        The regular expression to be used for capturing part of the input for processing. If there was no regular expression specified, this field is null.
      • writeFormat

        protected final java.lang.String writeFormat
        The format string used for packaging values to be written. If null or empty, it is ignored.
    • Constructor Detail

      • BeanFieldSingleValue

        public BeanFieldSingleValue​(java.lang.Class<?> type,
                                    java.lang.reflect.Field field,
                                    boolean required,
                                    java.util.Locale errorLocale,
                                    CsvConverter converter,
                                    java.lang.String capture,
                                    java.lang.String format)
        Simply calls the same constructor in the base class.
        Parameters:
        type - The type of the class in which this field is found. This is the type as instantiated by opencsv, and not necessarily the type in which the field is declared in the case of inheritance.
        field - A Field object.
        required - Whether or not this field is required in input
        errorLocale - The errorLocale to use for error messages.
        converter - The converter to be used to perform the actual data conversion
        capture - See CsvBindByName.capture()
        format - The format string used for packaging values to be written. If null or empty, it is ignored.
        See Also:
        AbstractBeanField(Class, Field, boolean, Locale, CsvConverter)