Package forgottentowns.mod.api
Record Class ColonyWork.Job
java.lang.Object
java.lang.Record
forgottentowns.mod.api.ColonyWork.Job
- Record Components:
queue- identity domainid- persistent native identitykind- native work or blueprint type name; tolerate future valuesstatus- PENDING, CLAIMED, COMPLETED or CANCELLEDposition- anchor coordinatespriority- normalized scheduling tiercitizenId- assigned citizen, or nulldefinitionId- recipe, placeable, block or zone identity; empty when inapplicable
- Enclosing interface:
ColonyWork
public static record ColonyWork.Job(ColonyWork.Queue queue, long id, String kind, String status, ColonyContext.Position position, int priority, Integer citizenId, String definitionId)
extends Record
Detached job metadata. Kind and definition are identifiers, never player-facing labels.
Completed/cancelled snapshots arrive through
ColonyExtension.onWorkFinished(forgottentowns.mod.api.ColonyContext, forgottentowns.mod.api.ColonyWork.Job).-
Constructor Summary
ConstructorsConstructorDescriptionJob(ColonyWork.Queue queue, long id, String kind, String status, ColonyContext.Position position, int priority, Integer citizenId, String definitionId) Creates an instance of aJobrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecitizenIdrecord component.Returns the value of thedefinitionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.kind()Returns the value of thekindrecord component.position()Returns the value of thepositionrecord component.intpriority()Returns the value of thepriorityrecord component.queue()Returns the value of thequeuerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Job
public Job(ColonyWork.Queue queue, long id, String kind, String status, ColonyContext.Position position, int priority, Integer citizenId, String definitionId) Creates an instance of aJobrecord class.- Parameters:
queue- the value for thequeuerecord componentid- the value for theidrecord componentkind- the value for thekindrecord componentstatus- the value for thestatusrecord componentposition- the value for thepositionrecord componentpriority- the value for thepriorityrecord componentcitizenId- the value for thecitizenIdrecord componentdefinitionId- the value for thedefinitionIdrecord 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 '=='. -
queue
Returns the value of thequeuerecord component.- Returns:
- the value of the
queuerecord component
-
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
citizenId
Returns the value of thecitizenIdrecord component.- Returns:
- the value of the
citizenIdrecord component
-
definitionId
Returns the value of thedefinitionIdrecord component.- Returns:
- the value of the
definitionIdrecord component
-