public class EscapeTextBuilderImpl extends Object implements EscapeTextBuilder
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty
Constructor and Description |
---|
EscapeTextBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
EscapeTextBuilder |
addEscapeProperty(Property aProperty) |
EscapeTextBuilder |
addEscapeProperty(String aKey,
String aValue) |
Property[] |
getEscapeProperties() |
EscapeTextMode |
getEscapeTextMode()
Retrieves the escape text mode from the escape text mode property.
|
String[] |
getText()
Retrieves the text from the text property.
|
void |
setEscapeProperties(Property... aProperties) |
void |
setEscapeTextMode(EscapeTextMode aEscapeTextMode)
Sets the escape text mode for the escape text mode property.
|
void |
setText(String... aText)
Sets the text for the text property.
|
protected String[] |
toEscaped(String[] aText,
List<Property> aProperties,
EscapeTextMode aEscapeTextMode) |
protected String |
toEscaped(String aText,
List<Property> aProperties,
EscapeTextMode aEscapeTextMode) |
static String |
toEscaped(String aUnEscaped,
String[][] aEscapeMatrix)
Escapes a text using the provided escape matrix which must be a two
dimensional array with two elements per line and where the element at
position 0 (of a line) represents the character and the element at
position 1 (of a line) the escaped character.
|
String |
toString()
The
String being build by the builder upon the settings of the
attributes. |
String[] |
toStrings()
The
String s being escaped by the builder upon the settings of the
attributes. |
static String |
toUnEscaped(String aEscaped,
String[][] aEscapeMatrix)
Unescapes a text using the provided escape matrix which must be a two
dimensional array with two elements per line and where the element at
position 0 (of a line) represents the character and the element at
position 1 (of a line) the escaped character.
|
B |
withText(Collection<String> aText)
Sets the text for the text property.
|
B |
withText(String... aText)
Sets the text for the text property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toString, withEscapeProperties, withEscapeTextMode
getText
setText, setText
withText
public EscapeTextMode getEscapeTextMode()
EscapeTextBuilder
getEscapeTextMode
in interface EscapeTextBuilder
public void setEscapeTextMode(EscapeTextMode aEscapeTextMode)
EscapeTextBuilder
setEscapeTextMode
in interface EscapeTextBuilder
aEscapeTextMode
- The escape text mode to be stored by the align text
mode property.public Property[] getEscapeProperties()
getEscapeProperties
in interface EscapeTextBuilder
public void setEscapeProperties(Property... aProperties)
setEscapeProperties
in interface EscapeTextBuilder
public EscapeTextBuilder addEscapeProperty(Property aProperty)
addEscapeProperty
in interface EscapeTextBuilder
public EscapeTextBuilder addEscapeProperty(String aKey, String aValue)
addEscapeProperty
in interface EscapeTextBuilder
public String[] toStrings() throws IllegalStateException
EscapeTextBuilder
String
s being escaped by the builder upon the settings of the
attributes.toStrings
in interface EscapeTextBuilder
toStrings
in interface Text<EscapeTextBuilder>
String
arrayIllegalStateException
protected String[] toEscaped(String[] aText, List<Property> aProperties, EscapeTextMode aEscapeTextMode)
protected String toEscaped(String aText, List<Property> aProperties, EscapeTextMode aEscapeTextMode)
public static String toEscaped(String aUnEscaped, String[][] aEscapeMatrix)
aUnEscaped
- The text to be escaped.aEscapeMatrix
- The matrix to be used for escaping.public static String toUnEscaped(String aEscaped, String[][] aEscapeMatrix)
aEscaped
- The text to be unescaped.aEscapeMatrix
- The matrix to be used for unescaping.public String[] getText()
TextAccessor
getText
in interface TextAccessor
public void setText(String... aText)
TextAccessor.TextMutator
setText
in interface TextAccessor.TextMutator
aText
- The text to be stored by the text property.public B withText(String... aText)
TextAccessor.TextBuilder
public B withText(Collection<String> aText)
TextAccessor.TextBuilder
withText
in interface TextAccessor.TextBuilder<Text<B extends Text<B>>>
aText
- The text to be stored by the text property.public String toString()
String
being build by the builder upon the settings of the
attributes. The string array is returned as a single String
with
the operating system's end of line marker (CR on on Windows and CR LF on
*nix operating systems) as determined by
SystemUtility.getLineBreak()
Copyright © 2016. All rights reserved.