Package com.tnsai.context.ephemeral
Record Class EphemeralContextManager.EphemeralConfig
java.lang.Object
java.lang.Record
com.tnsai.context.ephemeral.EphemeralContextManager.EphemeralConfig
- Enclosing class:
EphemeralContextManager
public static record EphemeralContextManager.EphemeralConfig(int keepLast, boolean keepSummary, String summaryTemplate)
extends Record
Configuration for an ephemeral action.
-
Constructor Summary
ConstructorsConstructorDescriptionEphemeralConfig(int keepLast) EphemeralConfig(int keepLast, boolean keepSummary, String summaryTemplate) Creates an instance of aEphemeralConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.from(com.tnsai.annotations.Ephemeral annotation) Creates config from annotation.final inthashCode()Returns a hash code value for this object.intkeepLast()Returns the value of thekeepLastrecord component.booleanReturns the value of thekeepSummaryrecord component.Returns the value of thesummaryTemplaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EphemeralConfig
public EphemeralConfig(int keepLast) -
EphemeralConfig
Creates an instance of aEphemeralConfigrecord class.- Parameters:
keepLast- the value for thekeepLastrecord componentkeepSummary- the value for thekeepSummaryrecord componentsummaryTemplate- the value for thesummaryTemplaterecord component
-
-
Method Details
-
from
public static EphemeralContextManager.EphemeralConfig from(com.tnsai.annotations.Ephemeral annotation) Creates config from annotation. -
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 '=='. -
keepLast
public int keepLast()Returns the value of thekeepLastrecord component.- Returns:
- the value of the
keepLastrecord component
-
keepSummary
public boolean keepSummary()Returns the value of thekeepSummaryrecord component.- Returns:
- the value of the
keepSummaryrecord component
-
summaryTemplate
Returns the value of thesummaryTemplaterecord component.- Returns:
- the value of the
summaryTemplaterecord component
-