Package org.qaddict.evaluation
Record Class ComposedNode
java.lang.Object
java.lang.Record
org.qaddict.evaluation.ComposedNode
- All Implemented Interfaces:
EvaluationNode
public record ComposedNode(boolean result, List<EvaluationNode> children)
extends Record
implements EvaluationNode
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionComposedNode(boolean result, List<EvaluationNode> children) Creates an instance of aComposedNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <D> ComposedNode.Builder<D> builderFor(Expectation<? super D> expectation) static <D> List<ComposedNode.Builder<D>> buildersFor(Collection<Expectation<? super D>> expectations) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.children()Returns the value of thechildrenrecord component.booleanresult()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ComposedNode
Creates an instance of aComposedNoderecord class.- Parameters:
result- the value for theresultrecord componentchildren- the value for thechildrenrecord component
-
-
Method Details
-
buildersFor
public static <D> List<ComposedNode.Builder<D>> buildersFor(Collection<Expectation<? super D>> expectations) -
builderFor
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
result
public boolean result()Returns the value of theresultrecord component.- Specified by:
resultin interfaceEvaluationNode- Returns:
- the value of the
resultrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-