Module it.auties.whatsappweb4j
Record Class BusinessHoursEntry
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(@NonNull String day, @NonNull 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.
-
Constructor Summary
ConstructorDescriptionBusinessHoursEntry
(@NonNull String day, @NonNull String mode, long openTime, long closeTime) Creates an instance of aBusinessHoursEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of thecloseTime
record component.@NonNull String
day()
Returns the value of theday
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns whether the business is always open.@NonNull String
mode()
Returns the value of themode
record component.static BusinessHoursEntry
Creates aBusinessHoursEntry
from aNode
.long
openTime()
Returns the value of theopenTime
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
Creates aBusinessHoursEntry
from aNode
.- Parameters:
node
- The node to extract the business hours entry information from.- Returns:
- A
BusinessHoursEntry
extracted 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 theday
record component.- Returns:
- the value of the
day
record component
-
mode
Returns the value of themode
record component.- Returns:
- the value of the
mode
record component
-
openTime
public long openTime()Returns the value of theopenTime
record component.- Returns:
- the value of the
openTime
record component
-
closeTime
public long closeTime()Returns the value of thecloseTime
record component.- Returns:
- the value of the
closeTime
record component
-