Package io.bytestreams.codec.core
Record Class Recorded<T>
java.lang.Object
java.lang.Record
io.bytestreams.codec.core.Recorded<T>
- Type Parameters:
T- the type of the decoded value- Record Components:
value- the decoded valuerawBytes- the raw bytes that were read from the input stream during decoding
A decoded value paired with the raw bytes it was decoded from.
Produced by RecordingCodec to preserve the original wire bytes alongside the decoded
value. Useful for auditing, replay, and debugging.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.byte[]rawBytes()Returns the value of therawBytesrecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
rawBytes
public byte[] rawBytes()Returns the value of therawBytesrecord component.- Returns:
- the value of the
rawBytesrecord component
-