Record Class CollectionChange.Replacement
java.lang.Object
java.lang.Record
org.hibernate.collection.spi.CollectionChange.Replacement
- All Implemented Interfaces:
CollectionChange
- Enclosing interface:
CollectionChange
-
Nested Class Summary
Nested classes/interfaces inherited from interface CollectionChange
CollectionChange.Addition, CollectionChange.Clear, CollectionChange.PositionChange, CollectionChange.Removal, CollectionChange.Replacement -
Constructor Summary
ConstructorsConstructorDescriptionReplacement(Object snapshotValue, Object currentValue, Object snapshotPosition, Object currentPosition) Creates an instance of aReplacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentPositionrecord component.Returns the value of thecurrentValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesnapshotPositionrecord component.Returns the value of thesnapshotValuerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Replacement
public Replacement(Object snapshotValue, Object currentValue, @Nullable Object snapshotPosition, @Nullable Object currentPosition) Creates an instance of aReplacementrecord class.- Parameters:
snapshotValue- the value for thesnapshotValuerecord componentcurrentValue- the value for thecurrentValuerecord componentsnapshotPosition- the value for thesnapshotPositionrecord componentcurrentPosition- the value for thecurrentPositionrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
snapshotValue
Returns the value of thesnapshotValuerecord component.- Returns:
- the value of the
snapshotValuerecord component
-
currentValue
Returns the value of thecurrentValuerecord component.- Returns:
- the value of the
currentValuerecord component
-
snapshotPosition
-
currentPosition
-