Record Class RaceResultsDTO
java.lang.Object
java.lang.Record
com.endurancetrio.business.event.dto.RaceResultsDTO
- Record Components:
race- the race these results belong toindividualResults- the results grouped by age group, where each age group maps to a list ofIndividualResultDTO
public record RaceResultsDTO(RaceDTO race, Map<AgeGroup,List<IndividualResultDTO>> individualResults)
extends Record
The
RaceResultsDTO holds the complete set of results for a given race, grouped by
AgeGroup.-
Constructor Summary
ConstructorsConstructorDescriptionRaceResultsDTO(RaceDTO race, Map<AgeGroup, List<IndividualResultDTO>> individualResults) Creates an instance of aRaceResultsDTOrecord 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 theindividualResultsrecord component.race()Returns the value of theracerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RaceResultsDTO
Creates an instance of aRaceResultsDTOrecord class.- Parameters:
race- the value for theracerecord componentindividualResults- the value for theindividualResultsrecord component
-
-
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). -
race
Returns the value of theracerecord component.- Returns:
- the value of the
racerecord component
-
individualResults
Returns the value of theindividualResultsrecord component.- Returns:
- the value of the
individualResultsrecord component
-