Record Class LootRecoveryState

java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.loot.LootRecoveryState

public record LootRecoveryState(@NotNull Path primaryFile, @NotNull Path recoveryFile, boolean primaryAvailable, boolean recoveryAvailable, boolean activeFromRecovery, @NotNull Optional<Instant> recoveryLastModified) extends Record
Files and state behind a pool's last-known-good recovery snapshot.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LootRecoveryState(@NotNull Path primaryFile, @NotNull Path recoveryFile, boolean primaryAvailable, boolean recoveryAvailable, boolean activeFromRecovery, @NotNull Optional<Instant> recoveryLastModified)
    Creates an instance of a LootRecoveryState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the activeFromRecovery record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the primaryAvailable record component.
    @NotNull Path
    Returns the value of the primaryFile record component.
    boolean
    Returns the value of the recoveryAvailable record component.
    @NotNull Path
    Returns the value of the recoveryFile record component.
    @NotNull Optional<Instant>
    Returns the value of the recoveryLastModified record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LootRecoveryState

      public LootRecoveryState(@NotNull @NotNull Path primaryFile, @NotNull @NotNull Path recoveryFile, boolean primaryAvailable, boolean recoveryAvailable, boolean activeFromRecovery, @NotNull @NotNull Optional<Instant> recoveryLastModified)
      Creates an instance of a LootRecoveryState record class.
      Parameters:
      primaryFile - the value for the primaryFile record component
      recoveryFile - the value for the recoveryFile record component
      primaryAvailable - the value for the primaryAvailable record component
      recoveryAvailable - the value for the recoveryAvailable record component
      activeFromRecovery - the value for the activeFromRecovery record component
      recoveryLastModified - the value for the recoveryLastModified 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.
    • primaryFile

      @NotNull public @NotNull Path primaryFile()
      Returns the value of the primaryFile record component.
      Returns:
      the value of the primaryFile record component
    • recoveryFile

      @NotNull public @NotNull Path recoveryFile()
      Returns the value of the recoveryFile record component.
      Returns:
      the value of the recoveryFile record component
    • primaryAvailable

      public boolean primaryAvailable()
      Returns the value of the primaryAvailable record component.
      Returns:
      the value of the primaryAvailable record component
    • recoveryAvailable

      public boolean recoveryAvailable()
      Returns the value of the recoveryAvailable record component.
      Returns:
      the value of the recoveryAvailable record component
    • activeFromRecovery

      public boolean activeFromRecovery()
      Returns the value of the activeFromRecovery record component.
      Returns:
      the value of the activeFromRecovery record component
    • recoveryLastModified

      @NotNull public @NotNull Optional<Instant> recoveryLastModified()
      Returns the value of the recoveryLastModified record component.
      Returns:
      the value of the recoveryLastModified record component