Package cool.scx.common.scheduler
Record Class ScheduleStatus
java.lang.Object
java.lang.Record
cool.scx.common.scheduler.ScheduleStatus
日程状态 包含循环的次数 (从 1 开始为第一次) 及 ScheduledFuture 可用于在方法内部中断执行
-
Constructor Summary
ConstructorsConstructorDescriptionScheduleStatus(long runCount, ScheduledFuture<?> scheduledFuture) Creates an instance of aScheduleStatusrecord 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.longrunCount()Returns the value of therunCountrecord component.Returns the value of thescheduledFuturerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScheduleStatus
Creates an instance of aScheduleStatusrecord class.- Parameters:
runCount- the value for therunCountrecord componentscheduledFuture- the value for thescheduledFuturerecord 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 '=='. -
runCount
public long runCount()Returns the value of therunCountrecord component.- Returns:
- the value of the
runCountrecord component
-
scheduledFuture
Returns the value of thescheduledFuturerecord component.- Returns:
- the value of the
scheduledFuturerecord component
-