public class KeyNameMapperImpl extends Object implements KeyNameMapper
Constructor and Description |
---|
KeyNameMapperImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addMappedField(Integer index,
String field) |
Integer |
addMappedField(String field) |
KeyNameMapper |
clone()
Clones the key name mapper
|
static KeyNameMapperImpl |
create(KeyFactory[] keyFactories) |
String |
getFieldForIndex(Integer index)
Gets the field for the index
|
Set<String> |
getFieldSet()
Gets a set of fields mapper
|
int |
getIndexForField(String field)
Gets the index used for the given field
|
Map<Integer,String> |
getMappings()
Provides a Map containing the index to field mappings
|
int |
getValueMarker() |
boolean |
isFullyMapped(Key mappedKey) |
boolean |
isMapped(String field)
Check if a field is mapped
|
void |
setValueMarker(int index) |
int |
size()
The amount of mapped fields
|
String |
toString() |
public static KeyNameMapperImpl create(KeyFactory[] keyFactories)
public int getIndexForField(String field)
KeyNameMapper
getIndexForField
in interface KeyNameMapper
field
- The field to request the mapped index forpublic Map<Integer,String> getMappings()
KeyNameMapper
getMappings
in interface KeyNameMapper
public boolean isMapped(String field)
KeyNameMapper
isMapped
in interface KeyNameMapper
field
- The field to check if it is mappedpublic int size()
KeyNameMapper
size
in interface KeyNameMapper
public String getFieldForIndex(Integer index)
KeyNameMapper
getFieldForIndex
in interface KeyNameMapper
index
- The index to get the field name forpublic Integer addMappedField(String field)
addMappedField
in interface KeyNameMapper
public Set<String> getFieldSet()
KeyNameMapper
getFieldSet
in interface KeyNameMapper
public boolean isFullyMapped(Key mappedKey)
isFullyMapped
in interface KeyNameMapper
public int getValueMarker()
getValueMarker
in interface KeyNameMapper
public void setValueMarker(int index)
setValueMarker
in interface KeyNameMapper
public KeyNameMapper clone()
KeyNameMapper
clone
in interface KeyNameMapper
clone
in class Object
Copyright © 2015. All rights reserved.