Package org.refcodes.textual
Interface TruncateTextBuilder
-
- All Superinterfaces:
Text<TruncateTextBuilder>
,TextAccessor
,TextAccessor.TextBuilder<TruncateTextBuilder>
,TextAccessor.TextMutator
,TextAccessor.TextProperty
,TextAccessor.TextProvider
- All Known Implementing Classes:
TruncateTextBuilderImpl
public interface TruncateTextBuilder extends Text<TruncateTextBuilder>
Strips given characters from text's left hand side or right hand side or both.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.textual.TextAccessor
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description char[]
getTruncateChars()
Retrieves the truncate chars from the truncate chars property.TruncateTextMode
getTruncateTextMode()
Retrieves the truncate text mode from the truncate text mode property.void
setTruncateChars(char... aTruncateChars)
Sets the truncate chars for the truncate chars property.void
setTruncateTextMode(TruncateTextMode aTruncateTextMode)
Sets the truncate text mode for the truncate text mode property.java.lang.String
toString()
TheString
being build by the builder upon the settings of the attributes.java.lang.String[]
toStrings()
TheString
s being build by the builder upon the settings of the attributes.default TruncateTextBuilder
withStripChars(char... aStripChars)
Sets the truncate chars for the truncate chars property.default TruncateTextBuilder
withText(java.lang.String... aTextLines)
Sets theString
array for the text property.default TruncateTextBuilder
withTruncateTextMode(TruncateTextMode aTruncateTextMode)
Sets the truncate text mode for the truncate text mode property.-
Methods inherited from interface org.refcodes.textual.TextAccessor
getText
-
Methods inherited from interface org.refcodes.textual.TextAccessor.TextBuilder
withText
-
Methods inherited from interface org.refcodes.textual.TextAccessor.TextMutator
setText, setText
-
-
-
-
Method Detail
-
getTruncateTextMode
TruncateTextMode getTruncateTextMode()
Retrieves the truncate text mode from the truncate text mode property.- Returns:
- The truncate text mode stored by the truncate text mode property.
-
setTruncateTextMode
void setTruncateTextMode(TruncateTextMode aTruncateTextMode)
Sets the truncate text mode for the truncate text mode property.- Parameters:
aTruncateTextMode
- The truncate text mode to be stored by the truncate text mode property.
-
withTruncateTextMode
default TruncateTextBuilder withTruncateTextMode(TruncateTextMode aTruncateTextMode)
Sets the truncate text mode for the truncate text mode property.- Parameters:
aTruncateTextMode
- The truncate text mode to be stored by the truncate text mode property.- Returns:
- The builder for applying multiple build operations.
-
withText
default TruncateTextBuilder withText(java.lang.String... aTextLines)
Sets theString
array for the text property.- Specified by:
withText
in interfaceText<TruncateTextBuilder>
- Specified by:
withText
in interfaceTextAccessor.TextBuilder<TruncateTextBuilder>
- Parameters:
aTextLines
- TheString
array be stored by the text property.- Returns:
- The builder for applying multiple build operations.
-
getTruncateChars
char[] getTruncateChars()
Retrieves the truncate chars from the truncate chars property.- Returns:
- The truncate chars stored by the truncate chars property.
-
setTruncateChars
void setTruncateChars(char... aTruncateChars)
Sets the truncate chars for the truncate chars property.- Parameters:
aTruncateChars
- The truncate chars to be stored by the text align mode property.
-
withStripChars
default TruncateTextBuilder withStripChars(char... aStripChars)
Sets the truncate chars for the truncate chars property.- Parameters:
aStripChars
- The truncate chars to be stored by the text align mode property.- Returns:
- The builder for applying multiple build operations.
-
toStrings
java.lang.String[] toStrings()
TheString
s being build by the builder upon the settings of the attributes.- Specified by:
toStrings
in interfaceTextAccessor.TextProvider
- Returns:
- The according resulting
String
array
-
toString
java.lang.String toString() throws java.lang.IllegalStateException
TheString
being build by the builder upon the settings of the attributes.- Specified by:
toString
in interfaceTextAccessor.TextProvider
- Overrides:
toString
in classjava.lang.Object
- Returns:
- The according resulting
String
- Throws:
java.lang.IllegalStateException
- Thrown in case more than one text line has been set via thewithText(String...)
orTextAccessor.TextMutator.setText(String...)
methods.
-
-