org.jopendocument.util
Class StringUtils.Escaper

java.lang.Object
  extended by org.jopendocument.util.StringUtils.Escaper
Enclosing class:
StringUtils

public static final class StringUtils.Escaper
extends Object


Constructor Summary
StringUtils.Escaper(char esc, char name)
          A new escaper that will have esc as escape character.
 
Method Summary
 StringUtils.Escaper add(char toRemove, char escapedName)
           
 boolean equals(Object obj)
           
 String escape(String s)
          Escape s, so that the resulting string has none of getEscapedChars().
 Set<Character> getEscapedChars()
           
 int hashCode()
           
 String unescape(String escaped)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils.Escaper

public StringUtils.Escaper(char esc,
                           char name)
A new escaper that will have esc as escape character.

Parameters:
esc - the escape character, eg '
name - the character that will be appended to esc, eg with S all occurrences of ' will be replaced by 'S
Method Detail

add

public StringUtils.Escaper add(char toRemove,
                               char escapedName)

getEscapedChars

public final Set<Character> getEscapedChars()

escape

public final String escape(String s)
Escape s, so that the resulting string has none of getEscapedChars().

Parameters:
s - a string to escape.
Returns:
the escaped form.

unescape

public final String unescape(String escaped)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2010 jOpenDocument All Rights Reserved.