Record Class SolutionDay24.Connection
java.lang.Object
java.lang.Record
com.expedient.adventofcodejade.solutions.year2024.SolutionDay24.Connection
- Enclosing class:
SolutionDay24
public static record SolutionDay24.Connection(List<String> inputGates, SolutionDay24.Relationship relationship, String outputGate)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionConnection(List<String> inputGates, SolutionDay24.Relationship relationship, String outputGate) Creates an instance of aConnectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinputGatesrecord component.Returns the value of theoutputGaterecord component.Returns the value of therelationshiprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Connection
public Connection(List<String> inputGates, SolutionDay24.Relationship relationship, String outputGate) Creates an instance of aConnectionrecord class.- Parameters:
inputGates- the value for theinputGatesrecord componentrelationship- the value for therelationshiprecord componentoutputGate- the value for theoutputGaterecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
inputGates
-
relationship
Returns the value of therelationshiprecord component.- Returns:
- the value of the
relationshiprecord component
-
outputGate
Returns the value of theoutputGaterecord component.- Returns:
- the value of the
outputGaterecord component
-