StringSignal
class StringSignal
Extends: Signal<String>
Package: dev.joid.lib.signal.impl.primitive · Module: core · Source: StringSignal.java
Signal of a String with the text operations of String, which write their result.
Description
Section titled “Description”It works like Signal; each operation applies the method of the same name of String to the value and writes the result.
An index outside the text throws a StringIndexOutOfBoundsException when the write applies.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| StringSignal() | Creates a signal whose value and default value are the empty text "". | |
| StringSignal(String value) | Creates a signal whose value and default value are value. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
this | append(String value) fluent | Adds value at the end of the text, then returns this signal; null adds the text "null". |
this | replace(char oldChar, char newChar) fluent | Replaces every oldChar with newChar, then returns this signal. |
this | replace(CharSequence target, CharSequence replacement) fluent | Replaces every occurrence of target with replacement, then returns this signal. |
this | toLowerCase() fluent | Writes the text in lower case, with the rules of the default locale, then returns this signal. |
this | toUpperCase() fluent | Writes the text in upper case, with the rules of the default locale, then returns this signal. |
this | trim() fluent | Removes the spaces and control characters at both ends of the text, then returns this signal. |
this | substring(int beginIndex) fluent | Keeps the text from beginIndex to its end, then returns this signal. |
this | substring(int beginIndex, int endIndex) fluent | Keeps the text from beginIndex included to endIndex excluded, then returns this signal. |
Inherited from Signal (12)
batch · silent · get · peek · isPresent · isWritable · toString · from · set · reset · removeOnChange · map
Events
Section titled “Events”Creation details
Section titled “Creation details”StringSignal
Section titled “StringSignal”StringSignal()
Creates a signal whose value and default value are the empty text "".
StringSignal(String value)
Creates a signal whose value and default value are value.
Method details
Section titled “Method details”append
Section titled “append”this append(String value) fluent
Adds value at the end of the text, then returns this signal; null adds the text "null".
replace
Section titled “replace”this replace(char oldChar, char newChar) fluent
Replaces every oldChar with newChar, then returns this signal.
this replace(CharSequence target, CharSequence replacement) fluent
Replaces every occurrence of target with replacement, then returns this signal.
toLowerCase
Section titled “toLowerCase”this toLowerCase() fluent
Writes the text in lower case, with the rules of the default locale, then returns this signal.
toUpperCase
Section titled “toUpperCase”this toUpperCase() fluent
Writes the text in upper case, with the rules of the default locale, then returns this signal.
this trim() fluent
Removes the spaces and control characters at both ends of the text, then returns this signal.
substring
Section titled “substring”this substring(int beginIndex) fluent
Keeps the text from beginIndex to its end, then returns this signal.
this substring(int beginIndex, int endIndex) fluent
Keeps the text from beginIndex included to endIndex excluded, then returns this signal.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
