Class BeanFieldSplit<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>

    public class BeanFieldSplit<T,​I>
    extends AbstractBeanField<T,​I>
    This class concerns itself with handling collection-valued bean fields.
    Since:
    4.2
    • Field Detail

      • splitOn

        private final java.util.regex.Pattern splitOn
      • capture

        private final java.util.regex.Pattern capture
      • writeDelimiter

        private final java.lang.String writeDelimiter
      • writeFormat

        private final java.lang.String writeFormat
      • collectionType

        private final java.lang.Class<? extends java.util.Collection> collectionType
      • elementType

        private final java.lang.Class<?> elementType
    • Constructor Detail

      • BeanFieldSplit

        public BeanFieldSplit​(java.lang.Class<?> type,
                              java.lang.reflect.Field field,
                              boolean required,
                              java.util.Locale errorLocale,
                              CsvConverter converter,
                              java.lang.String splitOn,
                              java.lang.String writeDelimiter,
                              java.lang.Class<? extends java.util.Collection> collectionType,
                              java.lang.Class<?> elementType,
                              java.lang.String capture,
                              java.lang.String format)
        The only valid constructor.
        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
        splitOn - See CsvBindAndSplitByName.splitOn()
        writeDelimiter - See CsvBindAndSplitByName.writeDelimiter()
        collectionType - See CsvBindAndSplitByName.collectionType()
        elementType - See CsvBindAndSplitByName.elementType()
        capture - See CsvBindAndSplitByName.capture()
        format - The format string used for packaging values to be written. If null or empty, it is ignored.