Record Class TeamDTO
java.lang.Object
java.lang.Record
com.endurancetrio.business.competitor.dto.TeamDTO
- Record Components:
id- the unique identifier of the teamfullName- the full name of the teamshortName- a brief name or abbreviation for the teamcity- the city where the team is based (may be null)county- the county where the team is based (may be null)district- the district where the team is based (may be null)
public record TeamDTO(Long id, String fullName, String shortName, String city, String county, String district)
extends Record
The
TeamDTO represents a sports team with its identification and geographic information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncity()Returns the value of thecityrecord component.county()Returns the value of thecountyrecord component.district()Returns the value of thedistrictrecord component.final booleanIndicates whether some other object is "equal to" this one.fullName()Returns the value of thefullNamerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theshortNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TeamDTO
public TeamDTO(Long id, String fullName, String shortName, String city, String county, String district) Creates an instance of aTeamDTOrecord class.- Parameters:
id- the value for theidrecord componentfullName- the value for thefullNamerecord componentshortName- the value for theshortNamerecord componentcity- the value for thecityrecord componentcounty- the value for thecountyrecord componentdistrict- the value for thedistrictrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
fullName
Returns the value of thefullNamerecord component.- Returns:
- the value of the
fullNamerecord component
-
shortName
Returns the value of theshortNamerecord component.- Returns:
- the value of the
shortNamerecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
county
Returns the value of thecountyrecord component.- Returns:
- the value of the
countyrecord component
-
district
Returns the value of thedistrictrecord component.- Returns:
- the value of the
districtrecord component
-