Package com.github.kagkarlsson.scheduler
Record Class Resolvable.SimpleResolvable
java.lang.Object
java.lang.Record
com.github.kagkarlsson.scheduler.Resolvable.SimpleResolvable
- All Implemented Interfaces:
Resolvable,HasTaskName
- Enclosing interface:
- Resolvable
public static record Resolvable.SimpleResolvable(String taskName, Instant executionTime)
extends Record
implements Resolvable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.kagkarlsson.scheduler.task.HasTaskName
HasTaskName.SimpleTaskNameNested classes/interfaces inherited from interface com.github.kagkarlsson.scheduler.Resolvable
Resolvable.SimpleResolvable -
Constructor Summary
ConstructorsConstructorDescriptionSimpleResolvable(String taskName, Instant executionTime) Creates an instance of aSimpleResolvablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutionTimerecord component.final inthashCode()Returns a hash code value for this object.taskName()Returns the value of thetaskNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimpleResolvable
Creates an instance of aSimpleResolvablerecord class.- Parameters:
taskName- the value for thetaskNamerecord componentexecutionTime- the value for theexecutionTimerecord component
-
-
Method Details
-
getExecutionTime
- Specified by:
getExecutionTimein interfaceResolvable
-
getTaskName
- Specified by:
getTaskNamein interfaceHasTaskName
-
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). -
taskName
Returns the value of thetaskNamerecord component.- Returns:
- the value of the
taskNamerecord component
-
executionTime
Returns the value of theexecutionTimerecord component.- Returns:
- the value of the
executionTimerecord component
-