|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectolg.csv.bean.filter.AbstractStringFilter
public abstract class AbstractStringFilter
Abstract class specialized in converting a string into another.
Field Summary | |
---|---|
private AbstractStringFilter |
filter
The successor in the filter chain. |
Constructor Summary | |
---|---|
AbstractStringFilter()
|
Method Summary | |
---|---|
protected abstract String |
doFiltre(String value)
Realizes the specified transformation promised by this filtre. |
String |
filtre(String value)
Returns the transformed string passed through this filter and his successors. |
static AbstractStringFilter |
getDecorateFilter(String before,
String after)
Returns a filter which decorate the given string. |
AbstractStringFilter |
getFilter()
Returns the successor. |
static AbstractStringFilter |
getLowerFilter(Locale locale)
Returns a filter specialized in lowercase setting. |
static AbstractStringFilter |
getReplaceFilter(String regex,
String replacement)
Returns a filter which replace all the occurrences of an regular expression in a string by a particular value. |
static AbstractStringFilter |
getSplitFilter(int index,
String separator)
Returns a filter which extracts a substring by splitting the given string around matches of an regular expression. |
static AbstractStringFilter |
getTrimFilter()
Returns a Filter which execute String String.trim() method. |
static AbstractStringFilter |
getUpperFilter(Locale locale)
Returns a filter specialized in uppercase setting. |
static AbstractStringFilter |
getUpperFirstFilter(Locale locale)
Returns a filter specialized in uppercase setting of the first letter of a string. |
void |
setFilter(AbstractStringFilter filter)
Sets the successor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private AbstractStringFilter filter
Constructor Detail |
---|
public AbstractStringFilter()
Method Detail |
---|
protected abstract String doFiltre(String value)
value
- the value to filter.
public final String filtre(String value)
value
- the string to filter
public AbstractStringFilter getFilter()
public void setFilter(AbstractStringFilter filter)
filter
- the successor in the filters chain.public static final AbstractStringFilter getLowerFilter(Locale locale)
locale
- the locale to use. if null
default locale is
used.
public static final AbstractStringFilter getUpperFilter(Locale locale)
locale
- the locale. If null
jvm default locale is used.
public static final AbstractStringFilter getUpperFirstFilter(Locale locale)
locale
- the locale. If null
jvm default locale is used.
public static final AbstractStringFilter getDecorateFilter(String before, String after)
before
- this string will be added front of the given string. Can be
null
after
- this string will be added behind the given string. Can be
null
public static final AbstractStringFilter getTrimFilter()
String.trim()
method.
public static final AbstractStringFilter getSplitFilter(int index, String separator)
throws an IllegalArgumentException if separator argument is
null
index
- the n-th valueseparator
- a regular expression. Must be not null
public static final AbstractStringFilter getReplaceFilter(String regex, String replacement)
throws an IllegalArgumentException if regex or replacement argument is
null
regex
- the regular expressionreplacement
- the replacement value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |