Package com.tnsai.prompt.optimizer
Record Class OptimizationSession.IterationRecord
java.lang.Object
java.lang.Record
com.tnsai.prompt.optimizer.OptimizationSession.IterationRecord
- Enclosing class:
OptimizationSession
public static record OptimizationSession.IterationRecord(int iteration, String prompt, float score, Instant timestamp)
extends Record
Record of a single optimization iteration.
-
Constructor Summary
ConstructorsConstructorDescriptionIterationRecord(int iteration, String prompt, float score, Instant timestamp) Creates an instance of aIterationRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theiterationrecord component.prompt()Returns the value of thepromptrecord component.floatscore()Returns the value of thescorerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IterationRecord
Creates an instance of aIterationRecordrecord class.- Parameters:
iteration- the value for theiterationrecord componentprompt- the value for thepromptrecord componentscore- the value for thescorerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
iteration
public int iteration()Returns the value of theiterationrecord component.- Returns:
- the value of the
iterationrecord component
-
prompt
Returns the value of thepromptrecord component.- Returns:
- the value of the
promptrecord component
-
score
public float score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-