Record Class FoliosRecord

java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.FoliosRecord

public record FoliosRecord(List<String> read, List<String> seen, List<String> questsDone, List<String> celebrated, List<String> obtained, List<FoliosRecord.Place> bookmarks, Optional<FoliosRecord.Place> last, boolean leftOpen, Optional<String> lastChapter, int lastPage) extends Record
  • Field Details

    • EMPTY

      public static final FoliosRecord EMPTY
    • MAX_EACH

      public static final int MAX_EACH
      See Also:
    • MAX_BOOKMARKS

      public static final int MAX_BOOKMARKS
      See Also:
    • CODEC

      public static final com.mojang.serialization.Codec<FoliosRecord> CODEC
    • STREAM_CODEC

      public static final net.ixdarklord.coolcatcore.api.network.codec.StreamCodec<io.netty.buffer.ByteBuf,FoliosRecord> STREAM_CODEC
  • Constructor Details

    • FoliosRecord

      public FoliosRecord(List<String> read, List<String> seen, List<String> questsDone, List<String> celebrated, List<String> obtained, List<FoliosRecord.Place> bookmarks, Optional<FoliosRecord.Place> last, boolean leftOpen, Optional<String> lastChapter, int lastPage)
      Creates an instance of a FoliosRecord record class.
      Parameters:
      read - the value for the read record component
      seen - the value for the seen record component
      questsDone - the value for the questsDone record component
      celebrated - the value for the celebrated record component
      obtained - the value for the obtained record component
      bookmarks - the value for the bookmarks record component
      last - the value for the last record component
      leftOpen - the value for the leftOpen record component
      lastChapter - the value for the lastChapter record component
      lastPage - the value for the lastPage record component
  • Method Details

    • capped

      public FoliosRecord capped()
    • forStack

      public FoliosRecord forStack()
    • 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.
    • read

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

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

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

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

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

      public List<FoliosRecord.Place> bookmarks()
      Returns the value of the bookmarks record component.
      Returns:
      the value of the bookmarks record component
    • last

      public Optional<FoliosRecord.Place> last()
      Returns the value of the last record component.
      Returns:
      the value of the last record component
    • leftOpen

      public boolean leftOpen()
      Returns the value of the leftOpen record component.
      Returns:
      the value of the leftOpen record component
    • lastChapter

      public Optional<String> lastChapter()
      Returns the value of the lastChapter record component.
      Returns:
      the value of the lastChapter record component
    • lastPage

      public int lastPage()
      Returns the value of the lastPage record component.
      Returns:
      the value of the lastPage record component