@Beta @GwtCompatible public final class CharEscaperBuilder extends Object
Constructor and Description |
---|
CharEscaperBuilder()
Construct a new sparse array builder.
|
Modifier and Type | Method and Description |
---|---|
CharEscaperBuilder |
addEscape(char c,
String r)
Add a new mapping from an index to an object to the escaping.
|
CharEscaperBuilder |
addEscapes(char[] cs,
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.
|
Escaper |
toEscaper()
Convert this builder into a char escaper which is just a decorator around the underlying array
of replacement char[]s.
|
public CharEscaperBuilder()
@CanIgnoreReturnValue public CharEscaperBuilder addEscape(char c, String r)
@CanIgnoreReturnValue public CharEscaperBuilder addEscapes(char[] cs, String r)
public char[][] toArray()
Copyright © 2010–2020. All rights reserved.