Record Class CanSleepInWorld.NotDuringSleepHoursRange
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.beds.sleep.systems.world.CanSleepInWorld.NotDuringSleepHoursRange
- All Implemented Interfaces:
CanSleepInWorld.Result
- Enclosing class:
CanSleepInWorld
public static record CanSleepInWorld.NotDuringSleepHoursRange(LocalDateTime worldTime, SleepConfig sleepConfig)
extends Record
implements CanSleepInWorld.Result
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SleepConfigThe field for thesleepConfigrecord component.private final LocalDateTimeThe field for theworldTimerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNotDuringSleepHoursRange(LocalDateTime worldTime, SleepConfig sleepConfig) Creates an instance of aNotDuringSleepHoursRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thesleepConfigrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworldTimerecord component.
-
Field Details
-
worldTime
The field for theworldTimerecord component. -
sleepConfig
The field for thesleepConfigrecord component.
-
-
Constructor Details
-
NotDuringSleepHoursRange
Creates an instance of aNotDuringSleepHoursRangerecord class.- Parameters:
worldTime- the value for theworldTimerecord componentsleepConfig- the value for thesleepConfigrecord component
-
-
Method Details
-
isNegative
public boolean isNegative()- Specified by:
isNegativein interfaceCanSleepInWorld.Result
-
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). -
worldTime
Returns the value of theworldTimerecord component.- Returns:
- the value of the
worldTimerecord component
-
sleepConfig
Returns the value of thesleepConfigrecord component.- Returns:
- the value of the
sleepConfigrecord component
-