Record Class WorkFacts.Task
java.lang.Object
java.lang.Record
dev.miyomiyo.agentbridge.api.work.WorkFacts.Task
- Enclosing class:
WorkFacts
public static record WorkFacts.Task(java.lang.String id, WorkSnapshot.State state, WorkFacts.Eligibility eligibility, java.util.Map<java.lang.String,java.lang.String> bindings)
extends java.lang.Record
-
Constructor Summary
ConstructorsConstructorDescriptionTask(java.lang.String id, WorkSnapshot.State state, WorkFacts.Eligibility eligibility, java.util.Map<java.lang.String, java.lang.String> bindings) Creates an instance of aTaskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionjava.util.Map<java.lang.String, java.lang.String> bindings()Returns the value of thebindingsrecord component.Returns the value of theeligibilityrecord component.final booleanequals(java.lang.Object o) Indicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.java.lang.Stringid()Returns the value of theidrecord component.state()Returns the value of thestaterecord component.final java.lang.StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Task
public Task(java.lang.String id, WorkSnapshot.State state, WorkFacts.Eligibility eligibility, java.util.Map<java.lang.String, java.lang.String> bindings) Creates an instance of aTaskrecord class.- Parameters:
id- the value for theidrecord componentstate- the value for thestaterecord componenteligibility- the value for theeligibilityrecord componentbindings- the value for thebindingsrecord component
-
-
Method Details
-
toString
public final java.lang.String 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.- Specified by:
toStringin classjava.lang.Record- Returns:
- a string representation of this object
-
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.- Specified by:
hashCodein classjava.lang.Record- Returns:
- a hash code value for this object
-
equals
public final boolean equals(java.lang.Object o) 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).- Specified by:
equalsin classjava.lang.Record- Parameters:
o- the object with which to compare- Returns:
trueif this object is the same as theoargument;falseotherwise.
-
id
public java.lang.String id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
eligibility
Returns the value of theeligibilityrecord component.- Returns:
- the value of the
eligibilityrecord component
-
bindings
public java.util.Map<java.lang.String,java.lang.String> bindings()Returns the value of thebindingsrecord component.- Returns:
- the value of the
bindingsrecord component
-