SignalReplayParts
final class SignalReplayParts
Package: dev.joid.internal.signal.replay · Module: core · Source: SignalReplayParts.java
Text of a concatenation whose parts are known values and holes left by local variables.
Description
Section titled “Description”The replay deduces each hole from the text that the setter received.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| SignalReplayParts() | Creates an empty text with no part. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | add(Object part) | Adds a known part at the end. |
void | addHole(String key, String description) | Adds a hole for the local variable key, described by description in the warnings. |
boolean | hasHoles() | If true, at least one part is a hole. |
String | getDescription() | Returns the description of the first hole, or null without holes. |
Object | result() | Returns the joined text when there is no hole, otherwise these parts. |
Map<String,String> | solve(String expected) | Returns the text of each hole that makes the parts equal to expected, or null when they cannot. |
boolean | isLive() | If true, a part depends on a signal. |
void | setLive(boolean live) | Sets whether a part depends on a signal. |
Creation details
Section titled “Creation details”SignalReplayParts
Section titled “SignalReplayParts”SignalReplayParts()
Creates an empty text with no part.
Method details
Section titled “Method details”void add(Object part)
Adds a known part at the end.
addHole
Section titled “addHole”void addHole(String key, String description)
Adds a hole for the local variable key, described by description in the warnings.
hasHoles
Section titled “hasHoles”boolean hasHoles()
If true, at least one part is a hole.
getDescription
Section titled “getDescription”String getDescription()
Returns the description of the first hole, or null without holes.
result
Section titled “result”Object result()
Returns the joined text when there is no hole, otherwise these parts.
Map<String,String> solve(String expected)
Returns the text of each hole that makes the parts equal to expected, or null when they cannot.
isLive
Section titled “isLive”boolean isLive()
If true, a part depends on a signal.
setLive
Section titled “setLive”void setLive(boolean live)
Sets whether a part depends on a 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
