Package dev.deepcore.challenge.session
Record Class SavedRunStateService.SavedRunSnapshot
java.lang.Object
java.lang.Record
dev.deepcore.challenge.session.SavedRunStateService.SavedRunSnapshot
- Enclosing class:
SavedRunStateService
public static record SavedRunStateService.SavedRunSnapshot(long savedAtMs, long runStartMs, long accumulatedPausedMs, boolean reachedNether, long netherMs, boolean reachedBlazeObjective, long blazeObjectiveMs, boolean reachedEnd, long endMs, List<String> participantUuids, List<String> enabledComponents, String difficulty, Map<String,SavedRunStateService.PlayerSnapshot> playerSnapshots)
extends Record
Snapshot of the full run state serialized to disk on a save vote.
-
Constructor Summary
ConstructorsConstructorDescriptionSavedRunSnapshot(long savedAtMs, long runStartMs, long accumulatedPausedMs, boolean reachedNether, long netherMs, boolean reachedBlazeObjective, long blazeObjectiveMs, boolean reachedEnd, long endMs, List<String> participantUuids, List<String> enabledComponents, String difficulty, Map<String, SavedRunStateService.PlayerSnapshot> playerSnapshots) Creates an instance of aSavedRunSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaccumulatedPausedMsrecord component.longReturns the value of theblazeObjectiveMsrecord component.Returns the value of thedifficultyrecord component.Returns the value of theenabledComponentsrecord component.longendMs()Returns the value of theendMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longnetherMs()Returns the value of thenetherMsrecord component.Returns the value of theparticipantUuidsrecord component.Returns the value of theplayerSnapshotsrecord component.booleanReturns the value of thereachedBlazeObjectiverecord component.booleanReturns the value of thereachedEndrecord component.booleanReturns the value of thereachedNetherrecord component.longReturns the value of therunStartMsrecord component.longReturns the value of thesavedAtMsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SavedRunSnapshot
public SavedRunSnapshot(long savedAtMs, long runStartMs, long accumulatedPausedMs, boolean reachedNether, long netherMs, boolean reachedBlazeObjective, long blazeObjectiveMs, boolean reachedEnd, long endMs, List<String> participantUuids, List<String> enabledComponents, String difficulty, Map<String, SavedRunStateService.PlayerSnapshot> playerSnapshots) Creates an instance of aSavedRunSnapshotrecord class.- Parameters:
savedAtMs- the value for thesavedAtMsrecord componentrunStartMs- the value for therunStartMsrecord componentaccumulatedPausedMs- the value for theaccumulatedPausedMsrecord componentreachedNether- the value for thereachedNetherrecord componentnetherMs- the value for thenetherMsrecord componentreachedBlazeObjective- the value for thereachedBlazeObjectiverecord componentblazeObjectiveMs- the value for theblazeObjectiveMsrecord componentreachedEnd- the value for thereachedEndrecord componentendMs- the value for theendMsrecord componentparticipantUuids- the value for theparticipantUuidsrecord componentenabledComponents- the value for theenabledComponentsrecord componentdifficulty- the value for thedifficultyrecord componentplayerSnapshots- the value for theplayerSnapshotsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
savedAtMs
public long savedAtMs()Returns the value of thesavedAtMsrecord component.- Returns:
- the value of the
savedAtMsrecord component
-
runStartMs
public long runStartMs()Returns the value of therunStartMsrecord component.- Returns:
- the value of the
runStartMsrecord component
-
accumulatedPausedMs
public long accumulatedPausedMs()Returns the value of theaccumulatedPausedMsrecord component.- Returns:
- the value of the
accumulatedPausedMsrecord component
-
reachedNether
public boolean reachedNether()Returns the value of thereachedNetherrecord component.- Returns:
- the value of the
reachedNetherrecord component
-
netherMs
public long netherMs()Returns the value of thenetherMsrecord component.- Returns:
- the value of the
netherMsrecord component
-
reachedBlazeObjective
public boolean reachedBlazeObjective()Returns the value of thereachedBlazeObjectiverecord component.- Returns:
- the value of the
reachedBlazeObjectiverecord component
-
blazeObjectiveMs
public long blazeObjectiveMs()Returns the value of theblazeObjectiveMsrecord component.- Returns:
- the value of the
blazeObjectiveMsrecord component
-
reachedEnd
public boolean reachedEnd()Returns the value of thereachedEndrecord component.- Returns:
- the value of the
reachedEndrecord component
-
endMs
public long endMs()Returns the value of theendMsrecord component.- Returns:
- the value of the
endMsrecord component
-
participantUuids
Returns the value of theparticipantUuidsrecord component.- Returns:
- the value of the
participantUuidsrecord component
-
enabledComponents
Returns the value of theenabledComponentsrecord component.- Returns:
- the value of the
enabledComponentsrecord component
-
difficulty
Returns the value of thedifficultyrecord component.- Returns:
- the value of the
difficultyrecord component
-
playerSnapshots
Returns the value of theplayerSnapshotsrecord component.- Returns:
- the value of the
playerSnapshotsrecord component
-