Record Class ComponentState
java.lang.Object
java.lang.Record
com.vaadin.observability.micrometer.insights.ComponentState
- Record Components:
component- fully-qualified class of the component holding the valuecaption- what the component is called on screen; nevernull, because a value the reader cannot find on screen is not a step they can carry outvalue- what it held, ornullwhen it held nothing
public record ComponentState(@Nullable String component, String caption, @Nullable String value)
extends Record
One value a view held when an interaction was captured: which component, as
it is known on screen, and what was in it.
A failure is often not caused by the interaction that reports it but by the
state it ran against: the returns desk blows up on "Process return" because
the reason is "Defective", and a replay that only says "click the button"
reproduces nothing. The state of the view, read at the moment the interaction
was captured, is what makes a replay reproduce.
Collected in development mode only, since a caption and a value are
application text that may carry user data; see ComponentCaptions.
-
Constructor Summary
ConstructorsConstructorDescriptionComponentState(@Nullable String component, String caption, @Nullable String value) Creates an instance of aComponentStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncaption()Returns the value of thecaptionrecord component.@Nullable StringReturns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@Nullable Stringvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
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). -
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-