Record Class PendingChanges.Snapshot
java.lang.Object
java.lang.Record
com.ultikits.ultitools.utils.PendingChanges.Snapshot
- Enclosing class:
PendingChanges
public static record PendingChanges.Snapshot(List<PendingChanges.PendingChange> entries, int truncated, long generation)
extends Record
A bounded list with the number omitted and the generation observed in the same read.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<PendingChanges.PendingChange> The field for theentriesrecord component.private final longThe field for thegenerationrecord component.private final intThe field for thetruncatedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSnapshot(List<PendingChanges.PendingChange> entries, int truncated, long generation) Creates an instance of aSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.inttotal()intReturns the value of thetruncatedrecord component.
-
Field Details
-
entries
The field for theentriesrecord component. -
truncated
private final int truncatedThe field for thetruncatedrecord component. -
generation
private final long generationThe field for thegenerationrecord component.
-
-
Constructor Details
-
Snapshot
Creates an instance of aSnapshotrecord class.- Parameters:
entries- the value for theentriesrecord componenttruncated- the value for thetruncatedrecord componentgeneration- the value for thegenerationrecord component
-
-
Method Details
-
total
public int total()- Returns:
- the number of visible and truncated changes combined
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
truncated
public int truncated()Returns the value of thetruncatedrecord component.- Returns:
- the value of the
truncatedrecord component
-
generation
public long generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-