Record Class DataMigration
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.data.DataMigration
- Record Components:
fromVersion- the data version this migration acceptsmigration- the upgrade; returns an error result if the data cannot be migrated
-
Constructor Summary
ConstructorsConstructorDescriptionDataMigration(int fromVersion, @NotNull Function<DataValue, Result<DataValue>> migration) Creates an instance of aDataMigrationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefromVersionrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themigrationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataMigration
-
-
Method Details
-
apply
-
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. -
fromVersion
public int fromVersion()Returns the value of thefromVersionrecord component.- Returns:
- the value of the
fromVersionrecord component
-
migration
-