|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectolg.csv.bean.filter.AbstractStringFilter
olg.csv.bean.filter.impl.SplitFilter
public final class SplitFilter
Filter which extracts a substring by splitting the given string around matches of an regular expression.
Field Summary | |
---|---|
private int |
index
index of the expression to extract. |
private String |
separator
the reg exp separator. |
Constructor Summary | |
---|---|
SplitFilter(int index,
String separator)
|
Method Summary | |
---|---|
protected String |
doFiltre(String value)
Realizes the specified transformation promised by this filtre. |
int |
getIndex()
|
String |
getSeparator()
|
void |
setIndex(int index)
Sets the index. |
void |
setSeparator(String separator)
Sets the separator. |
Methods inherited from class olg.csv.bean.filter.AbstractStringFilter |
---|
filtre, getDecorateFilter, getFilter, getLowerFilter, getReplaceFilter, getSplitFilter, getTrimFilter, getUpperFilter, getUpperFirstFilter, setFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String separator
private int index
Constructor Detail |
---|
public SplitFilter(int index, String separator)
index
- the n-th expression found by splitting a string around a
separator.separator
- a regular expression. Must not be null
Method Detail |
---|
protected String doFiltre(String value)
Returns the expression found at the index after splitting the value
arount the separator. null
if the splitted value length is
less or equals than the index.
throws UsageInvalideException
if separator is null
doFiltre
in class AbstractStringFilter
value
- the value to filter.
public String getSeparator()
public void setSeparator(String separator)
separator
- the separator. Could be a regexp.public int getIndex()
public void setIndex(int index)
index
- the index.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |