Package no.priv.bang.handlereg.services
Record Class Favorittpar
java.lang.Object
java.lang.Record
no.priv.bang.handlereg.services.Favorittpar
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFavorittpar(Favoritt forste, Favoritt andre) Creates an instance of aFavorittparrecord class. -
Method Summary
Modifier and TypeMethodDescriptionandre()Returns the value of theandrerecord component.final booleanIndicates whether some other object is "equal to" this one.forste()Returns the value of theforsterecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.static Favorittpar.Builderwith()
-
Field Details
-
forste
The field for theforsterecord component. -
andre
The field for theandrerecord component.
-
-
Constructor Details
-
Favorittpar
Creates an instance of aFavorittparrecord class.- Parameters:
forste- the value for theforsterecord componentandre- the value for theandrerecord component
-
-
Method Details
-
with
-
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). -
forste
Returns the value of theforsterecord component.- Returns:
- the value of the
forsterecord component
-
andre
Returns the value of theandrerecord component.- Returns:
- the value of the
andrerecord component
-