Record Class DataStorageHelper.StorageData
java.lang.Object
java.lang.Record
com.bleudev.ppl_utils.DataStorageHelper.StorageData
- Enclosing class:
DataStorageHelper
-
Constructor Summary
ConstructorsConstructorDescriptionStorageData(long startRestartTime, long restartTime, int cachedEnderChestCount, String rpLatestVersion) Creates an instance of aStorageDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecachedEnderChestCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of therestartTimerecord component.Returns the value of therpLatestVersionrecord component.longReturns the value of thestartRestartTimerecord component.final StringtoString()Returns a string representation of this record class.@NotNull DataStorageHelper.StorageDatawithCachedEnderChestCount(int newCount) @NotNull DataStorageHelper.StorageDatawithRestartTime(long newTime) @NotNull DataStorageHelper.StorageDatawithRpLatestVersion(String newVersion) @NotNull DataStorageHelper.StorageDatawithStartRestartTime(long newTime)
-
Constructor Details
-
StorageData
public StorageData(long startRestartTime, long restartTime, int cachedEnderChestCount, String rpLatestVersion) Creates an instance of aStorageDatarecord class.- Parameters:
startRestartTime- the value for thestartRestartTimerecord componentrestartTime- the value for therestartTimerecord componentcachedEnderChestCount- the value for thecachedEnderChestCountrecord componentrpLatestVersion- the value for therpLatestVersionrecord component
-
-
Method Details
-
withStartRestartTime
@Contract("_ -> new") @NotNull public @NotNull DataStorageHelper.StorageData withStartRestartTime(long newTime) -
withRestartTime
@Contract("_ -> new") @NotNull public @NotNull DataStorageHelper.StorageData withRestartTime(long newTime) -
withCachedEnderChestCount
@Contract("_ -> new") @NotNull public @NotNull DataStorageHelper.StorageData withCachedEnderChestCount(int newCount) -
withRpLatestVersion
@Contract("_ -> new") @NotNull public @NotNull DataStorageHelper.StorageData withRpLatestVersion(String newVersion) -
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. -
startRestartTime
public long startRestartTime()Returns the value of thestartRestartTimerecord component.- Returns:
- the value of the
startRestartTimerecord component
-
restartTime
public long restartTime()Returns the value of therestartTimerecord component.- Returns:
- the value of the
restartTimerecord component
-
cachedEnderChestCount
public int cachedEnderChestCount()Returns the value of thecachedEnderChestCountrecord component.- Returns:
- the value of the
cachedEnderChestCountrecord component
-
rpLatestVersion
Returns the value of therpLatestVersionrecord component.- Returns:
- the value of the
rpLatestVersionrecord component
-