Package org.localify.venue.dto
Record Class VenueResponse
java.lang.Object
java.lang.Record
org.localify.venue.dto.VenueResponse
- Record Components:
id- The ID of the venue.name- The name of the venue.address- The address of the venue.latitude- The latitude of the venue.longitude- The longitude of the venue.city- The city where the venue is located.type- The type of the venue.
public record VenueResponse(UUID id, String name, String address, double latitude, double longitude, CityResponse city, String type)
extends Record
Represents a response for a venue.
-
Constructor Summary
ConstructorsConstructorDescriptionVenueResponse(UUID id, String name, String address, double latitude, double longitude, CityResponse city, String type) Creates an instance of aVenueResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.city()Returns the value of thecityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.doublelatitude()Returns the value of thelatituderecord component.doubleReturns the value of thelongituderecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
VenueResponse
public VenueResponse(UUID id, String name, String address, double latitude, double longitude, CityResponse city, String type) Creates an instance of aVenueResponserecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentaddress- the value for theaddressrecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentcity- the value for thecityrecord componenttype- the value for thetyperecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
latitude
public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-