Record Class OpeningHours
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.OpeningHours
- Record Components:
currentDay- The opening hours for the current day.days- A list of lists containing opening hours for each day of the week. Each inner list contains one or more time slots for that day.
public record OpeningHours(List<DayOpeningHours> currentDay, List<List<DayOpeningHours>> days)
extends Record
Represents the opening hours for a business or location, including both the current day's hours
and a weekly schedule. This is used in the Brave Search API to provide structured information
about when a business is open or closed.
-
Constructor Summary
ConstructorsConstructorDescriptionOpeningHours(List<DayOpeningHours> currentDay, List<List<DayOpeningHours>> days) Creates an instance of aOpeningHoursrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentDayrecord component.days()Returns the value of thedaysrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OpeningHours
Creates an instance of aOpeningHoursrecord class.- Parameters:
currentDay- the value for thecurrentDayrecord componentdays- the value for thedaysrecord 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). -
currentDay
Returns the value of thecurrentDayrecord component.- Returns:
- the value of the
currentDayrecord component
-
days
Returns the value of thedaysrecord component.- Returns:
- the value of the
daysrecord component
-