Package com.opencsv.bean
Class AbstractFieldMap<I,K extends Comparable<K>,C extends ComplexFieldMapEntry<I,K,T>,T>
java.lang.Object
com.opencsv.bean.AbstractFieldMap<I,K,C,T>
- Type Parameters:
I- The initializer type used to build the many-to-one mappingK- Type of the field identifier (key)C- Type of the ComplexFieldMapEntry usedT- Type of the bean being converted
- All Implemented Interfaces:
FieldMap<I,K, C, T>
- Direct Known Subclasses:
FieldMapByName,FieldMapByPosition
public abstract class AbstractFieldMap<I,K extends Comparable<K>,C extends ComplexFieldMapEntry<I,K,T>,T>
extends Object
implements FieldMap<I,K,C,T>
A base class to collect all generalized components of a
FieldMap.
May be used by all as a base class for their own implementations of
FieldMap.- Since:
- 4.2
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFieldMap(Locale errorLocale) Initializes thisFieldMap. -
Method Summary
Modifier and TypeMethodDescriptionGets theBeanFieldassociated with this key.Associates the givenBeanFieldwith the givenkey.voidsetErrorLocale(Locale errorLocale) Sets the locale to be used for error messages.values()Provides all values currently in the map.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.opencsv.bean.FieldMap
generateHeader, putComplex
-
Field Details
-
Constructor Details
-
AbstractFieldMap
Initializes thisFieldMap.- Parameters:
errorLocale- The locale to be used for error messages
-
-
Method Details
-
get
Description copied from interface:FieldMapGets theBeanFieldassociated with this key. If a key could possibly match both a regular, simple key (one added withFieldMap.put(Comparable, BeanField)), and a complex key (one added withFieldMap.putComplex(java.lang.Object, com.opencsv.bean.BeanField)), the simple key is always matched. If a key could match more than one complex key, the return value is undefined. -
put
Description copied from interface:FieldMapAssociates the givenBeanFieldwith the givenkey. -
values
Description copied from interface:FieldMapProvides all values currently in the map. -
setErrorLocale
Description copied from interface:FieldMapSets the locale to be used for error messages.- Specified by:
setErrorLocalein interfaceFieldMap<I,K extends Comparable<K>, C extends ComplexFieldMapEntry<I, K, T>, T> - Parameters:
errorLocale- The locale to be used for error messages
-