Module evita.java.driver
Package io.evitadb.driver
Record Class EvitaClientSession.StreamValueWrapper<T>
java.lang.Object
java.lang.Record
io.evitadb.driver.EvitaClientSession.StreamValueWrapper<T>
- Type Parameters:
T-- Record Components:
value- value returned by the servererror- error returned by the servercompleted- flag that signals the end of the stream
- Enclosing class:
- EvitaClientSession
public static record EvitaClientSession.StreamValueWrapper<T>(@Nullable T value, @Nullable Throwable error, boolean completed)
extends Record
Simple wrapper class that allows to pass capture value, or signalize end of stream with possible error returned
byt the server.
-
Constructor Summary
ConstructorsConstructorDescriptionStreamValueWrapper(Throwable error) StreamValueWrapper(T value) StreamValueWrapper(T value, Throwable error, boolean completed) Creates an instance of aStreamValueWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecompletedrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.static <T> EvitaClientSession.StreamValueWrapper<T>final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
streamCompleted
-
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 '=='. -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
completed
public boolean completed()Returns the value of thecompletedrecord component.- Returns:
- the value of the
completedrecord component
-