Text<OverwriteTextBuilder>
, TextAccessor
, TextAccessor.TextBuilder<OverwriteTextBuilder>
, TextAccessor.TextMutator
, TextAccessor.TextProperty
, TextAccessor.TextProvider
public class OverwriteTextBuilder extends Object implements Text<OverwriteTextBuilder>
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
Constructor | Description |
---|---|
OverwriteTextBuilder() |
Modifier and Type | Method | Description |
---|---|---|
static String |
asOverwriteLeft(String aText,
String aWriteOverText) |
Overwrites a text starting at the left hand side with the given
"overwriting" text.
|
static String |
asOverwriteRight(String aText,
String aWriteOverText) |
Overwrites a text starting at the right hand side with the given
"overwriting" text.
|
static String |
asOverwriteText(String aText,
String aWriteOverText,
OverwriteTextMode aOverwriteTextMode) |
To overwrite.
|
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 aTextOverwriteMode) |
Sets the overwrite text mode for the overwrite text mode property.
|
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...)
followed by TextAccessor.TextProvider.toString() . |
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...)
followed by TextAccessor.TextProvider.toStrings() . |
OverwriteTextBuilder |
withOverwriteTextMode(OverwriteTextMode aOverwriteTextMode) |
Sets the overwrite text mode for the overwrite text mode property.
|
OverwriteTextBuilder |
withOverwritingText(String aOverwritingText) |
Sets the overwriting text for the overwriting text property.
|
B |
withText(String... aText) |
With text.
|
B |
withText(Collection<String> aText) |
With text.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getText
withText
setText, setText
letText, letText
toString
public String getOverwritingText()
public void setOverwritingText(String aOverwritingText)
aOverwritingText
- The overwriting text to be stored by the
overwriting text property.public OverwriteTextMode getOverwriteTextMode()
public void setTextOverwriteMode(OverwriteTextMode aTextOverwriteMode)
aTextOverwriteMode
- The overwrite text mode to be stored by the
overwrite text mode property.public String[] toStrings()
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.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
arraypublic OverwriteTextBuilder withOverwritingText(String aOverwritingText)
aOverwritingText
- The overwriting text to be stored by the
overwriting text property.public OverwriteTextBuilder withOverwriteTextMode(OverwriteTextMode aOverwriteTextMode)
aOverwriteTextMode
- The overwrite text mode to be stored by the
overwrite text mode property.public static String asOverwriteText(String aText, String aWriteOverText, OverwriteTextMode aOverwriteTextMode)
aText
- the textaWriteOverText
- the write over textaOverwriteTextMode
- the overwrite text modepublic static String asOverwriteLeft(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.public static String asOverwriteRight(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()
getText
in interface TextAccessor
public void setText(String... aText)
setText
in interface TextAccessor.TextMutator
aText
- The text to be stored by the text property.public B withText(String... aText)
public B withText(Collection<String> aText)
withText
in interface TextAccessor.TextBuilder<B extends Text<B>>
aText
- the textpublic String toString()
String
being build by the builder upon the settings of
the attributes. In case more then one line has been set as input and
the functionality of the builder is applied to each line in separate,
then this method returns all of them lines concatenated with a line
break between each of them (implementation depended).toString
in interface TextAccessor.TextProvider
toString
in class Object
String
public String toString(String... aText)
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 © 2021. All rights reserved.