|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.parser.CropStringMapper
public class CropStringMapper
A mapper that crops a string if it is longer than a specified length. The actual mapping is delegated to a parent mapper.
Field Summary | |
---|---|
private int |
maxLength
|
private Mapper |
parent
|
Constructor Summary | |
---|---|
CropStringMapper(Mapper parent,
int maxLength)
Create a new CropStringMapper. |
Method Summary | |
---|---|
Float |
getFloat(FlatFileParser.Data data)
Get the value for the line of data as a float. |
Integer |
getInt(FlatFileParser.Data data)
Get the value for the line of data as an integer. |
String |
getValue(FlatFileParser.Data data)
Use the parent mapper to get the string value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Mapper parent
private final int maxLength
Constructor Detail |
---|
public CropStringMapper(Mapper parent, int maxLength)
parent
- The parent mapper that does the actual mappingmaxLength
- The maximum length of stingsMethod Detail |
---|
public String getValue(FlatFileParser.Data data)
getValue
in interface Mapper
data
- The line of data
public Integer getInt(FlatFileParser.Data data)
Mapper
getInt
in interface Mapper
data
- The line of data
public Float getFloat(FlatFileParser.Data data)
Mapper
getFloat
in interface Mapper
data
- The line of data
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |