|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CharacterReplacer
Rule based (see CharacterReplacer.getMap()
) character replacer. Use CharacterReplacer.getWriter(java.io.Writer)
to create a filterd
writer or CharacterReplacer.processText(String)
to apply these rules.
Method Summary | |
---|---|
Map<CharContainer,String> |
getMap()
Return an unmodifiable containing all replacement rules of this character replacer. |
Writer |
getWriter(Writer out)
Short form for getWriter(out, false) . |
Writer |
getWriter(Writer out,
boolean compressWhiteSpaces)
Create a filtered writer which processes each character according to this replacement rules. |
StringBuffer |
processText(CharSequence s)
Convinience method to replace all characters for which a replacement rule exist according to the matching replacement rule. |
String |
processText(String s)
Convinience method to replace all characters for which a replacement rule exist according to the matching replacement rule. |
Method Detail |
---|
String processText(String s)
CharacterReplacer.processText(CharSequence)
StringBuffer processText(CharSequence s)
Writer getWriter(Writer out)
getWriter(out, false)
.
Writer getWriter(Writer out, boolean compressWhiteSpaces)
out
without conversion. In compressWhiteSpaces
mode consecutive
white spaces are replaced with one space character (for the definition of white space see
Character.isWhitespace(char)
).
out
- writer where converted output is directed tocompressWhiteSpaces
- In compressWhiteSpaces
mode consecutive white spaces are replaced with one
space.
out
Map<CharContainer,String> getMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |