|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.util.common.base.CharEscaperBuilder
public class CharEscaperBuilder
Simple helper class to build a "sparse" array of objects based on the indexes that were added to it. The array will be from 0 to the maximum index given. All non-set indexes will contain null (so it's not really a sparse array, just a pseudo sparse array). The builder can also return a CharEscaper based on the generated array.
Constructor Summary | |
---|---|
CharEscaperBuilder()
Construct a new sparse array builder. |
Method Summary | |
---|---|
CharEscaperBuilder |
addEscape(char c,
java.lang.String r)
Add a new mapping from an index to an object to the escaping. |
CharEscaperBuilder |
addEscapes(char[] cs,
java.lang.String r)
Add multiple mappings at once for a particular index. |
char[][] |
toArray()
Convert this builder into an array of char[]s where the maximum index is the value of the highest character that has been seen. |
CharEscaper |
toEscaper()
Convert this builder into a char escaper which is just a decorator around the underlying array of replacement char[]s. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CharEscaperBuilder()
Method Detail |
---|
public CharEscaperBuilder addEscape(char c, java.lang.String r)
public CharEscaperBuilder addEscapes(char[] cs, java.lang.String r)
public char[][] toArray()
public CharEscaper toEscaper()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |