Record Class Tagged<T>
java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.agent.Tagged<T>
- Type Parameters:
T- the entry type- Record Components:
entry- the entry to write- the tags to write it with
An entry returned from a bound method together with the tags it should be
written with (SPEC ยง10.3, issue #16). The binder unwraps it before any other
return handling: a same-space take result goes through
complete(taken, entry, lease, tags), atomically with the completion,
and anything else through write(entry, lease, tags). The sibling of
Contribution: a return
value the binder recognises, so no annotation attribute has to fix at bind
time what usually depends on the entry.
@SpaceNotify(space = "intake")
public Tagged<Instance> estimate(RegisteredClaim claim) {
return Tagged.of(Instance.damageFinding(claim), "claimId", claim.claimId(),
"rdf:type", Vocabulary.DAMAGE_FINDING);
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static <T> Tagged<T> Wraps an entry with tags given as alternating keys and values.static <T> Tagged<T> Wraps an entry with its tags.tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Tagged
-
-
Method Details
-
of
-
of
Wraps an entry with tags given as alternating keys and values.- Throws:
IllegalArgumentException- when the keys and values do not pair up
-
toString
-
hashCode
-
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). -
entry
-
tags
-