Record Class DatabaseAuditServiceImpl.IdRange

java.lang.Object
java.lang.Record
fr.becpg.repo.audit.service.impl.DatabaseAuditServiceImpl.IdRange
Enclosing class:
DatabaseAuditServiceImpl

private static record DatabaseAuditServiceImpl.IdRange(long lowId, long highId) extends Record
A closed range of audit entry identifiers.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    private final long
    The field for the highId record component.
    private final long
    The field for the lowId record component.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    IdRange(long lowId, long highId)
    Creates an instance of a IdRange record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the highId record component.
    private boolean
     
    long
    Returns the value of the lowId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • lowId

      private final long lowId
      The field for the lowId record component.
    • highId

      private final long highId
      The field for the highId record component.
    • EMPTY

      private static final DatabaseAuditServiceImpl.IdRange EMPTY
  • Constructor Details

    • IdRange

      private IdRange(long lowId, long highId)
      Creates an instance of a IdRange record class.
      Parameters:
      lowId - the value for the lowId record component
      highId - the value for the highId record component
  • Method Details

    • isEmpty

      private boolean isEmpty()
    • 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. All components in this record class are compared with '=='.
      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.
    • lowId

      public long lowId()
      Returns the value of the lowId record component.
      Returns:
      the value of the lowId record component
    • highId

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