Package com.enhancedechest.log
Record Class ChestLogService.Capture
java.lang.Object
java.lang.Record
com.enhancedechest.log.ChestLogService.Capture
- Enclosing class:
ChestLogService
public static record ChestLogService.Capture(byte[] blob, Map<String,Integer> counts, int size)
extends Record
An encoded, thread-safe capture of a chest at close: bytes to store, totals to diff.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]blob()Returns the value of theblobrecord component.counts()Returns the value of thecountsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Capture
Creates an instance of aCapturerecord class.- Parameters:
blob- the value for theblobrecord componentcounts- the value for thecountsrecord componentsize- the value for thesizerecord 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 '=='. -
blob
public byte[] blob()Returns the value of theblobrecord component.- Returns:
- the value of the
blobrecord component
-
counts
Returns the value of thecountsrecord component.- Returns:
- the value of the
countsrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-