Record Class InteractionGraph.Edge
java.lang.Object
java.lang.Record
com.tnsai.coordination.observability.InteractionGraph.Edge
- Record Components:
from- source agent IDto- target agent IDweight- edge weight (interaction frequency)type- interaction type (e.g., "message", "task_assignment")attributes- additional edge attributes
- Enclosing class:
InteractionGraph
public static record InteractionGraph.Edge(String from, String to, double weight, String type, Map<String,Object> attributes)
extends Record
A directed, weighted edge in the interaction graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.doubleweight()Returns the value of theweightrecord component.
-
Constructor Details
-
Edge
Creates an Edge with validation.
-
-
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 '=='. -
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-