public class OverwriteTextBuilderImpl extends Object implements OverwriteTextBuilder
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
Constructor and Description |
---|
OverwriteTextBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
OverwriteTextMode |
getOverwriteTextMode()
Retrieves the overwrite text mode from the overwrite text mode property.
|
String |
getOverwritingText()
Retrieves the overwriting text from the overwriting text property.
|
String[] |
getText()
Retrieves the text from the text property.
|
void |
setOverwritingText(String aOverwritingText)
Sets the overwriting text for the overwriting text property.
|
void |
setText(String... aText)
Sets the text for the text property.
|
void |
setTextOverwriteMode(OverwriteTextMode aOverwriteTextMode)
Sets the overwrite text mode for the overwrite text mode property.
|
protected static String |
toOverwrite(String aText,
String aWriteOverText,
OverwriteTextMode aOverwriteTextMode) |
protected static String |
toOverwriteLeft(String aText,
String aWriteOverText)
Overwrites a text starting at the left hand side with the given
"overwriting" text.
|
protected static String |
toOverwriteRight(String aText,
String aWriteOverText)
Overwrites a text starting at the right hand side with the given
"overwriting" text.
|
String |
toString()
The
String being build by the builder upon the settings of the
attributes. |
String |
toString(String... aText)
Race condition safe shortcut for using
Text.withText(String...) |
String[] |
toStrings()
The
String s being build by the builder upon the settings of
the attributes. |
String[] |
toStrings(String... aText)
Race condition safe shortcut for using
Text.withText(String...) |
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
withOverwriteTextMode, withOverwritingText
getText
setText, setText
withText
toString
public String getOverwritingText()
OverwriteTextBuilder
getOverwritingText
in interface OverwriteTextBuilder
public void setOverwritingText(String aOverwritingText)
OverwriteTextBuilder
setOverwritingText
in interface OverwriteTextBuilder
aOverwritingText
- The overwriting text to be stored by the
overwriting text property.public OverwriteTextMode getOverwriteTextMode()
OverwriteTextBuilder
getOverwriteTextMode
in interface OverwriteTextBuilder
public void setTextOverwriteMode(OverwriteTextMode aOverwriteTextMode)
OverwriteTextBuilder
setTextOverwriteMode
in interface OverwriteTextBuilder
aOverwriteTextMode
- The overwrite text mode to be stored by the
overwrite text mode property.public String[] toStrings()
TextAccessor.TextProvider
String
s being build by the builder upon the settings of
the attributes.toStrings
in interface TextAccessor.TextProvider
String
arraypublic String[] toStrings(String... aText)
Text
Text.withText(String...)
followed by TextAccessor.TextProvider.toStrings()
.
Implementation requirements: This method must not(!) be implemented by
calling Text.withText(String...)
followed by TextAccessor.TextProvider.toStrings()
(do
not change the text property) as this would not be thread safe!toStrings
in interface Text<OverwriteTextBuilder>
aText
- The text to be processed.String
arrayprotected static String toOverwrite(String aText, String aWriteOverText, OverwriteTextMode aOverwriteTextMode)
protected static String toOverwriteLeft(String aText, String aWriteOverText)
aText
- The text to be overwritten.aWriteOverText
- The text used for overwriting.String
overwritten on the left hand side with the given
"overwriting" text.protected static String toOverwriteRight(String aText, String aWriteOverText)
aText
- The text to be overwritten.aWriteOverText
- The text used for overwriting.String
overwritten on the right hand side with the
given "overwriting" text.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()
toString
in interface TextAccessor.TextProvider
toString
in class Object
String
public String toString(String... aText)
Text
Text.withText(String...)
followed by TextAccessor.TextProvider.toString()
.
Implementation requirements: This method must not(!) be implemented by
calling Text.withText(String...)
followed by TextAccessor.TextProvider.toString()
(do
not change the text property) as this would not be thread safe!Copyright © 2017. All rights reserved.