Package com.tnsai.agents.groups
Record Class MembershipManager.MembershipHistoryEntry
java.lang.Object
java.lang.Record
com.tnsai.agents.groups.MembershipManager.MembershipHistoryEntry
- Enclosing interface:
MembershipManager
public static record MembershipManager.MembershipHistoryEntry(String agentId, String agentName, MembershipManager.MembershipAction action, String reason, Instant timestamp)
extends Record
Historical membership event.
-
Constructor Summary
ConstructorsConstructorDescriptionMembershipHistoryEntry(String agentId, String agentName, MembershipManager.MembershipAction action, String reason, Instant timestamp) Creates an instance of aMembershipHistoryEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.agentId()Returns the value of theagentIdrecord component.Returns the value of theagentNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MembershipHistoryEntry
public MembershipHistoryEntry(String agentId, String agentName, MembershipManager.MembershipAction action, String reason, Instant timestamp) Creates an instance of aMembershipHistoryEntryrecord class.- Parameters:
agentId- the value for theagentIdrecord componentagentName- the value for theagentNamerecord componentaction- the value for theactionrecord componentreason- the value for thereasonrecord componenttimestamp- the value for thetimestamprecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
agentName
Returns the value of theagentNamerecord component.- Returns:
- the value of the
agentNamerecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-