Text<SecretHintBuilder>
, TextAccessor
, TextAccessor.TextBuilder<SecretHintBuilder>
, TextAccessor.TextMutator
, TextAccessor.TextProperty
, TextAccessor.TextProvider
public class SecretHintBuilder extends Object implements Text<SecretHintBuilder>
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
Constructor | Description |
---|---|
SecretHintBuilder() |
Modifier and Type | Method | Description |
---|---|---|
static String |
asString(String aText) |
Convenience method for directly invoking
AbstractText.toString(String...) without leaving any state. |
static String |
asString(String... aText) |
Convenience method for directly invoking
toString(String...)
without leaving any state. |
static String[] |
asStrings(String... aText) |
Convenience method for directly invoking
toString(String...)
without leaving any state. |
String[] |
getText() |
Retrieves the text from the text property.
|
void |
setText(String... aText) |
Sets the text for the text 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() . |
protected static String |
toString(String aSecret) |
This method provides a password hint by keeping the first and the last
characters of the password and exchanging the rest by an asterisk "*".
|
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
getText
withText
setText
letText, letText
toString
public void setText(String... aText)
setText
in interface TextAccessor.TextMutator
aText
- The text to be stored by the text 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<SecretHintBuilder>
aText
- The text to be processed.String
arraypublic static String asString(String aText)
AbstractText.toString(String...)
without leaving any state.aText
- The text to be obscured.public static String asString(String... aText)
toString(String...)
without leaving any state.aText
- The text to be obscured.public static String[] asStrings(String... aText)
toString(String...)
without leaving any state.aText
- array The text to be obscured.protected static String toString(String aSecret)
aSecret
- The secret to be printedpublic String[] getText()
getText
in interface TextAccessor
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.