Record Class StageConnector
java.lang.Object
java.lang.Record
com.tnsai.coordination.groups.pipeline.StageConnector
- Record Components:
fromStage- source stage nametoStage- target stage nametransformer- function to transform output from source before passing to target
public record StageConnector(String fromStage, String toStage, UnaryOperator<String> transformer)
extends Record
Connects two pipeline stages with optional input transformation.
-
Constructor Summary
ConstructorsConstructorDescriptionStageConnector(String fromStage, String toStage, UnaryOperator<String> transformer) Creates a StageConnector with validation. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromStagerecord component.final inthashCode()Returns a hash code value for this object.static StageConnectorpassThrough(String from, String to) Creates a pass-through connector (no transformation).toStage()Returns the value of thetoStagerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransformerrecord component.
-
Constructor Details
-
StageConnector
Creates a StageConnector with validation.
-
-
Method Details
-
passThrough
Creates a pass-through connector (no transformation).- Parameters:
from- source stage nameto- target stage name- Returns:
- connector
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
fromStage
Returns the value of thefromStagerecord component.- Returns:
- the value of the
fromStagerecord component
-
toStage
Returns the value of thetoStagerecord component.- Returns:
- the value of the
toStagerecord component
-
transformer
Returns the value of thetransformerrecord component.- Returns:
- the value of the
transformerrecord component
-