T
- Type of the bean being convertedpublic class PositionToBeanField<T> extends AbstractFieldMapEntry<String,Integer,T> implements Iterable<FieldMapByPositionEntry<T>>
BeanField
.errorLocale, field
Constructor and Description |
---|
PositionToBeanField(String rangeDefinition,
int maxIndex,
BeanField<T,Integer> field,
Locale errorLocale)
Initializes this mapping with a list of ranges and the associated
BeanField . |
Modifier and Type | Method and Description |
---|---|
void |
attenuateRanges(int maxIndex)
If there are ranges in the list of ranges encompassed by this mapping
that stretch beyond the maximum index given, they are shortened to be
no longer than the maximum index.
|
boolean |
contains(Integer key)
Determines whether or not the given key is contained in this entry.
|
String |
getInitializer()
Returns the information used to initialize this entry.
|
Iterator<FieldMapByPositionEntry<T>> |
iterator() |
getBeanField, setErrorLocale
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PositionToBeanField(String rangeDefinition, int maxIndex, BeanField<T,Integer> field, Locale errorLocale)
BeanField
.rangeDefinition
- A definition of ranges as documented in
CsvBindAndJoinByPosition.position()
maxIndex
- The maximum index allowed for a range. Ranges will be
adjusted as documented in attenuateRanges(int)
.field
- The BeanField
this mapping maps toerrorLocale
- The locale for error messagesCsvBadConverterException
- If rangeDefinition
cannot be parsedpublic void attenuateRanges(int maxIndex)
maxIndex
- The new maximum for rangespublic boolean contains(Integer key)
ComplexFieldMapEntry
contains
in interface ComplexFieldMapEntry<String,Integer,T>
key
- The key to be locatedkey
is represented by this entrypublic String getInitializer()
ComplexFieldMapEntry
getInitializer
in interface ComplexFieldMapEntry<String,Integer,T>
public Iterator<FieldMapByPositionEntry<T>> iterator()
iterator
in interface Iterable<FieldMapByPositionEntry<T>>
Copyright © 2005–2023. All rights reserved.