Skip to content

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.

The replay deduces each hole from the text that the setter received.

ReturnsSignatureSummary
SignalReplayParts()Creates an empty text with no part.

ReturnsSignatureSummary
voidadd(Object part)Adds a known part at the end.
voidaddHole(String key, String description)Adds a hole for the local variable key, described by description in the warnings.
booleanhasHoles()If true, at least one part is a hole.
StringgetDescription()Returns the description of the first hole, or null without holes.
Objectresult()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.
booleanisLive()If true, a part depends on a signal.
voidsetLive(boolean live)Sets whether a part depends on a signal.

SignalReplayParts()

Creates an empty text with no part.

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.


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

Report a problem with this page