Package net.ixdarklord.folios.api.client
Record Class FoliosEntry.Listing
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.FoliosEntry.Listing
- Record Components:
name- raw, as written; null to take its title, else the name of the item it shows, else its entry'sicon- its own; null to take the item it shows, else its entry's iconpage- which page of the entry it is (from 0)element- which element of that page it is (from 0), or -1 for the page itselftitle- its title as written, or nullshown- what it shows: its items and its wordslocks- what keeps it closed besides its entry: its page's lock, and its own as an element
- Enclosing class:
FoliosEntry
public static record FoliosEntry.Listing(@Nullable String name, @Nullable FoliosIcon icon, int page, int element, @Nullable String title, FoliosPageElement shown, List<FoliosLock> locks)
extends Record
A page of the entry, or an element of one, written with
"index": listed in the book's index and found by
its search as an entry is, under a name and an icon of its own, and opening the entry at it. In JSON,
"index": true, or "index": {"name": ..., "icon": ...} to name it and give it an icon.-
Constructor Summary
ConstructorsConstructorDescriptionListing(@Nullable String name, @Nullable FoliosIcon icon, int page, int element, @Nullable String title, FoliosPageElement shown, List<FoliosLock> locks) Creates an instance of aListingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintelement()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable FoliosIconicon()Returns the value of theiconrecord component.icon(FoliosEntry entry) The icon it is listed with.booleanisOpen(FoliosEntry entry) Whether it can be read: its entry open, and nothing of its own keeping it closed.booleanisVisible(FoliosEntry entry) Whether it is listed at all: it and its entry not secret, or open.link(FoliosEntry entry) Where it is, as a link:entry:<id>#@<page>for a page,entry:<id>#@<page>.<element>for an element.locks()Returns the value of thelocksrecord component.@Nullable Stringname()Returns the value of thenamerecord component.intpage()Returns the value of thepagerecord component.shown()Returns the value of theshownrecord component.@Nullable Stringtitle()Returns the value of thetitlerecord component.net.minecraft.network.chat.Componenttitle(FoliosEntry entry) What it is listed as.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Listing
public Listing(@Nullable @Nullable String name, @Nullable @Nullable FoliosIcon icon, int page, int element, @Nullable @Nullable String title, FoliosPageElement shown, List<FoliosLock> locks) Creates an instance of aListingrecord class.- Parameters:
name- the value for thenamerecord componenticon- the value for theiconrecord componentpage- the value for thepagerecord componentelement- the value for theelementrecord componenttitle- the value for thetitlerecord componentshown- the value for theshownrecord componentlocks- the value for thelocksrecord component
-
-
Method Details
-
title
What it is listed as. -
icon
The icon it is listed with. -
link
Where it is, as a link:entry:<id>#@<page>for a page,entry:<id>#@<page>.<element>for an element. -
isOpen
Whether it can be read: its entry open, and nothing of its own keeping it closed. -
isVisible
Whether it is listed at all: it and its entry not secret, or open. -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
element
public int element()Returns the value of theelementrecord component.- Returns:
- the value of the
elementrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
shown
Returns the value of theshownrecord component.- Returns:
- the value of the
shownrecord component
-
locks
Returns the value of thelocksrecord component.- Returns:
- the value of the
locksrecord component
-