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 Details

    • entries

      private final List<PendingChanges.PendingChange> entries
      The field for the entries record component.
    • truncated

      private final int truncated
      The field for the truncated record component.
    • generation

      private final long generation
      The field for the generation record component.
  • Constructor Details

    • Snapshot

      public Snapshot(List<PendingChanges.PendingChange> entries, int truncated, long generation)
      Creates an instance of a Snapshot record class.
      Parameters:
      entries - the value for the entries record component
      truncated - the value for the truncated record component
      generation - the value for the generation record component
  • Method Details

    • total

      public int total()
      Returns:
      the number of visible and truncated changes combined
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entries

      Returns the value of the entries record component.
      Returns:
      the value of the entries record component
    • truncated

      public int truncated()
      Returns the value of the truncated record component.
      Returns:
      the value of the truncated record component
    • generation

      public long generation()
      Returns the value of the generation record component.
      Returns:
      the value of the generation record component