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 convertedpublic abstract class AbstractFieldMap<I,K extends Comparable<K>,C extends ComplexFieldMapEntry<I,K,T>,T> extends Object implements FieldMap<I,K,C,T>
FieldMap
.
May be used by all as a base class for their own implementations of
FieldMap
.Modifier and Type | Field and Description |
---|---|
protected List<C> |
complexMapList
A list of entries representing all complex, that is many-to-one, mappings
represented in this
FieldMap . |
protected Locale |
errorLocale
The locale for error messages.
|
protected SortedMap<K,BeanField<T,K>> |
simpleMap
A map for all simple, that is one-to-one, mappings represented in this
FieldMap . |
Modifier | Constructor and Description |
---|---|
protected |
AbstractFieldMap(Locale errorLocale)
Initializes this
FieldMap . |
Modifier and Type | Method and Description |
---|---|
BeanField<T,K> |
get(K key)
Gets the
BeanField associated with this key. |
BeanField<T,K> |
put(K key,
BeanField<T,K> value)
Associates the given
BeanField with the given key . |
void |
setErrorLocale(Locale errorLocale)
Sets the locale to be used for error messages.
|
Collection<BeanField<T,K>> |
values()
Provides all values currently in the map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateHeader, putComplex
protected Locale errorLocale
protected final SortedMap<K extends Comparable<K>,BeanField<T,K extends Comparable<K>>> simpleMap
FieldMap
.public BeanField<T,K> get(K key)
FieldMap
BeanField
associated with this key.
If a key could possibly match both a regular, simple key (one added with
FieldMap.put(Comparable, BeanField)
), and a
complex key (one added with
FieldMap.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.public BeanField<T,K> put(K key, BeanField<T,K> value)
FieldMap
BeanField
with the given key
.public Collection<BeanField<T,K>> values()
FieldMap
public void setErrorLocale(Locale errorLocale)
FieldMap
setErrorLocale
in interface FieldMap<I,K extends Comparable<K>,C extends ComplexFieldMapEntry<I,K,T>,T>
errorLocale
- The locale to be used for error messagesCopyright © 2005–2023. All rights reserved.