Package com.codeborne.selenide
Record Class CheckResult
java.lang.Object
java.lang.Record
com.codeborne.selenide.CheckResult
public record CheckResult(CheckResult.Verdict verdict, @Nullable String message, @Nullable Object actualValue, LocalDateTime timestamp)
extends Record
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCheckResult
(boolean checkSucceeded, @Nullable Object actualValue) CheckResult
(CheckResult.Verdict verdict, @Nullable Object actualValue) CheckResult
(CheckResult.Verdict verdict, @Nullable String message, @Nullable Object actualValue, LocalDateTime timestamp) Creates an instance of aCheckResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CheckResult
accepted()
static CheckResult
@Nullable Object
Returns the value of theactualValue
record component.final boolean
Indicates whether some other object is "equal to" this one.<T> @Nullable T
<T> T
getActualValueOrElse
(T defaultValue) getMessageOrElse
(Supplier<String> defaultMessage) final int
hashCode()
Returns a hash code value for this object.@Nullable String
message()
Returns the value of themessage
record component.static CheckResult
<T> T
Returns the value of thetimestamp
record component.toString()
Returns a string representation of this record class.verdict()
Returns the value of theverdict
record component.
-
Constructor Details
-
CheckResult
-
CheckResult
-
CheckResult
public CheckResult(CheckResult.Verdict verdict, @Nullable String message, @Nullable Object actualValue, LocalDateTime timestamp) Creates an instance of aCheckResult
record class.- Parameters:
verdict
- the value for theverdict
record componentmessage
- the value for themessage
record componentactualValue
- the value for theactualValue
record componenttimestamp
- the value for thetimestamp
record component
-
-
Method Details
-
rejected
-
accepted
-
accepted
-
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. -
getMessageOrElse
-
getActualValue
public <T> @Nullable T getActualValue() -
getActualValueOrElse
public <T> T getActualValueOrElse(T defaultValue) -
requireActualValue
public <T> T requireActualValue() -
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)
. -
verdict
Returns the value of theverdict
record component.- Returns:
- the value of the
verdict
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
actualValue
Returns the value of theactualValue
record component.- Returns:
- the value of the
actualValue
record component
-
timestamp
Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-