Record Class SpotlightPageElement
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.page.SpotlightPageElement
- All Implemented Interfaces:
FoliosPageElement
public record SpotlightPageElement(FoliosStack item, Optional<String> title, String text, boolean link)
extends Record
implements FoliosPageElement
-
Nested Class Summary
Nested classes/interfaces inherited from interface FoliosPageElement
FoliosPageElement.Laid, FoliosPageElement.Part, FoliosPageElement.SpreadHalf -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SpotlightPageElement> -
Constructor Summary
ConstructorsConstructorDescriptionSpotlightPageElement(FoliosStack item, Optional<String> title, String text, boolean link) Creates an instance of aSpotlightPageElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.items()The items this page is about: anywhere in the book, pressing one of them opens this page.lay(FoliosLayout layout) Sets the page out: one or more pages, each drawn on its own.booleanlink()Returns the value of thelinkrecord component.Words of the page a search should find it by.text()Returns the value of thetextrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface FoliosPageElement
objectives, spread
-
Field Details
-
CODEC
-
-
Constructor Details
-
SpotlightPageElement
Creates an instance of aSpotlightPageElementrecord class.- Parameters:
item- the value for theitemrecord componenttitle- the value for thetitlerecord componenttext- the value for thetextrecord componentlink- the value for thelinkrecord component
-
-
Method Details
-
lay
Description copied from interface:FoliosPageElementSets the page out: one or more pages, each drawn on its own.- Specified by:
layin interfaceFoliosPageElement
-
searchText
Description copied from interface:FoliosPageElementWords of the page a search should find it by.- Specified by:
searchTextin interfaceFoliosPageElement
-
items
Description copied from interface:FoliosPageElementThe items this page is about: anywhere in the book, pressing one of them opens this page.- Specified by:
itemsin interfaceFoliosPageElement
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
title
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
link
public boolean link()Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-