java.lang.Object
java.lang.Record
it.auties.whatsapp.model.business.BusinessHoursEntry
- Record Components:
day- The day of the week that this entry represents.mode- The mode of operation for this day.openTime- The time in seconds since midnight that the business opens.closeTime- The time in seconds since midnight that the business closes.
public record BusinessHoursEntry(String day, String mode, long openTime, long closeTime)
extends Record
A business hours entry that represents the hours of operation for a single day of the week.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBusinessHoursEntry(String day, String mode, long openTime, long closeTime) Creates an instance of aBusinessHoursEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecloseTimerecord component.day()Returns the value of thedayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether the business is always open.mode()Returns the value of themoderecord component.static BusinessHoursEntryCreates aBusinessHoursEntryfrom aNode.longopenTime()Returns the value of theopenTimerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Method Details
-
of
Creates aBusinessHoursEntryfrom aNode.- Parameters:
node- The node to extract the business hours entry information from.- Returns:
- A
BusinessHoursEntryextracted from the provided node.
-
isAlwaysOpen
public boolean isAlwaysOpen()Returns whether the business is always open.- Returns:
- whether the business is always open
-
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 '=='. -
day
Returns the value of thedayrecord component.- Returns:
- the value of the
dayrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
openTime
public long openTime()Returns the value of theopenTimerecord component.- Returns:
- the value of the
openTimerecord component
-
closeTime
public long closeTime()Returns the value of thecloseTimerecord component.- Returns:
- the value of the
closeTimerecord component
-