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 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 a SavedRunSnapshot record class.
      Parameters:
      savedAtMs - the value for the savedAtMs record component
      runStartMs - the value for the runStartMs record component
      accumulatedPausedMs - the value for the accumulatedPausedMs record component
      reachedNether - the value for the reachedNether record component
      netherMs - the value for the netherMs record component
      reachedBlazeObjective - the value for the reachedBlazeObjective record component
      blazeObjectiveMs - the value for the blazeObjectiveMs record component
      reachedEnd - the value for the reachedEnd record component
      endMs - the value for the endMs record component
      participantUuids - the value for the participantUuids record component
      enabledComponents - the value for the enabledComponents record component
      difficulty - the value for the difficulty record component
      playerSnapshots - the value for the playerSnapshots record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • savedAtMs

      public long savedAtMs()
      Returns the value of the savedAtMs record component.
      Returns:
      the value of the savedAtMs record component
    • runStartMs

      public long runStartMs()
      Returns the value of the runStartMs record component.
      Returns:
      the value of the runStartMs record component
    • accumulatedPausedMs

      public long accumulatedPausedMs()
      Returns the value of the accumulatedPausedMs record component.
      Returns:
      the value of the accumulatedPausedMs record component
    • reachedNether

      public boolean reachedNether()
      Returns the value of the reachedNether record component.
      Returns:
      the value of the reachedNether record component
    • netherMs

      public long netherMs()
      Returns the value of the netherMs record component.
      Returns:
      the value of the netherMs record component
    • reachedBlazeObjective

      public boolean reachedBlazeObjective()
      Returns the value of the reachedBlazeObjective record component.
      Returns:
      the value of the reachedBlazeObjective record component
    • blazeObjectiveMs

      public long blazeObjectiveMs()
      Returns the value of the blazeObjectiveMs record component.
      Returns:
      the value of the blazeObjectiveMs record component
    • reachedEnd

      public boolean reachedEnd()
      Returns the value of the reachedEnd record component.
      Returns:
      the value of the reachedEnd record component
    • endMs

      public long endMs()
      Returns the value of the endMs record component.
      Returns:
      the value of the endMs record component
    • participantUuids

      public List<String> participantUuids()
      Returns the value of the participantUuids record component.
      Returns:
      the value of the participantUuids record component
    • enabledComponents

      public List<String> enabledComponents()
      Returns the value of the enabledComponents record component.
      Returns:
      the value of the enabledComponents record component
    • difficulty

      public String difficulty()
      Returns the value of the difficulty record component.
      Returns:
      the value of the difficulty record component
    • playerSnapshots

      public Map<String,SavedRunStateService.PlayerSnapshot> playerSnapshots()
      Returns the value of the playerSnapshots record component.
      Returns:
      the value of the playerSnapshots record component