Record Class BatchItemResult.Success<T>
java.lang.Object
java.lang.Record
dev.langchain4j.model.batch.BatchItemResult.Success<T>
- Type Parameters:
T- the type of the response payload- Record Components:
response- the successful response, nevernull
- All Implemented Interfaces:
BatchItemResult<T>
- Enclosing interface:
BatchItemResult<T>
public static record BatchItemResult.Success<T>(T response)
extends Record
implements BatchItemResult<T>
The successful outcome of a single batch request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface BatchItemResult
BatchItemResult.Failure<T>, BatchItemResult.Success<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable BatchErrorerror()Returns the error, ornullif this request succeeded.final inthashCode()Returns a hash code value for this object.booleanReturnstrueif this request succeeded.response()Returns the value of theresponserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Success
-
-
Method Details
-
isSuccess
public boolean isSuccess()Description copied from interface:BatchItemResultReturnstrueif this request succeeded.- Specified by:
isSuccessin interfaceBatchItemResult<T>
-
error
Description copied from interface:BatchItemResultReturns the error, ornullif this request succeeded.- Specified by:
errorin interfaceBatchItemResult<T>
-
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). -
response
-