ReplaceTextBuilder
, Text<ReplaceTextBuilder>
, TextAccessor
, TextAccessor.TextBuilder<ReplaceTextBuilder>
, TextAccessor.TextMutator
, TextAccessor.TextProperty
, TextAccessor.TextProvider
public class ReplaceTextBuilderImpl extends Object implements ReplaceTextBuilder
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
Constructor | Description |
---|---|
ReplaceTextBuilderImpl() |
Modifier and Type | Method | Description |
---|---|---|
String |
getFindText() |
Retrieves the find text from the find text property.
|
String |
getReplaceText() |
Retrieves the replace text from the replace text property.
|
String[] |
getText() |
Retrieves the text from the text property.
|
void |
setFindText(String aFindText) |
Sets the find text for the find text property.
|
void |
setReplaceText(String aReplaceText) |
Sets the replace text for the replace text property.
|
void |
setText(String... aText) |
Sets the text for the text property.
|
protected static String[] |
toReplaced(String[] aText,
String aFindText,
String aReplaceText) |
To replaced.
|
protected static int |
toReplaced(StringBuffer aTextBuffer,
String aFindText,
String aReplaceText) |
Replaces a text by an other text in a StringBuffer.
|
protected static String |
toReplaced(String aText,
String aFindText,
String aReplaceText) |
|
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() . |
B |
withText(String... aText) |
With text.
|
B |
withText(Collection<String> aText) |
With text.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
withFindText, withReplaceText
getText
withText
setText, setText
toString
public String getReplaceText()
getReplaceText
in interface ReplaceTextBuilder
public void setReplaceText(String aReplaceText)
setReplaceText
in interface ReplaceTextBuilder
aReplaceText
- The replace text to be stored by the text align mode
property.public String getFindText()
getFindText
in interface ReplaceTextBuilder
public void setFindText(String aFindText)
setFindText
in interface ReplaceTextBuilder
aFindText
- The find text to be stored by the text align mode
property.public String[] toStrings() throws IllegalStateException
String
s being build by the builder upon the settings of
the attributes.toStrings
in interface TextAccessor.TextProvider
String
arrayIllegalStateException
public 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<ReplaceTextBuilder>
aText
- The text to be processed.String
arrayprotected static String[] toReplaced(String[] aText, String aFindText, String aReplaceText)
aText
- the textaFindText
- the find textaReplaceText
- the replace textprotected static int toReplaced(StringBuffer aTextBuffer, String aFindText, String aReplaceText)
aTextBuffer
- The buffer containing text with keywords.aFindText
- The text which has to be replaced.aReplaceText
- The text that should be places over the original.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 © 2018. All rights reserved.