Record Class Scoped.UndoToken<T>
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.merlin.framework.Scoped.UndoToken<T>
- All Implemented Interfaces:
AutoCloseable
public static record Scoped.UndoToken<T>(Scoped<T> cell, T oldValue)
extends Record
implements AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncell()Returns the value of thecellrecord component.voidclose()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.oldValue()Returns the value of theoldValuerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UndoToken
Creates an instance of aUndoTokenrecord class.- Parameters:
cell- the value for thecellrecord componentoldValue- the value for theoldValuerecord component
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
cell
Returns the value of thecellrecord component.- Returns:
- the value of the
cellrecord component
-
oldValue
Returns the value of theoldValuerecord component.- Returns:
- the value of the
oldValuerecord component
-