Class BeanFieldSingleValue<T,I>

java.lang.Object
com.opencsv.bean.AbstractBeanField<T,I>
com.opencsv.bean.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
  • Field Details

    • capture

      protected final 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 String writeFormat
      The format string used for packaging values to be written. If null or empty, it is ignored.
  • Constructor Details

    • BeanFieldSingleValue

      public BeanFieldSingleValue(Class<?> type, Field field, boolean required, Locale errorLocale, CsvConverter converter, String capture, 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:
  • Method Details