Record Class LinksPageElement
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.page.LinksPageElement
- All Implemented Interfaces:
FoliosPageElement
public record LinksPageElement(List<LinksPageElement.Link> links, Optional<String> title, String text)
extends Record
implements FoliosPageElement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAn entry to link to (its id, with an optional#marker), and the words shown for it; empty for its name.Nested classes/interfaces inherited from interface FoliosPageElement
FoliosPageElement.Laid, FoliosPageElement.Part, FoliosPageElement.SpreadHalf -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<LinksPageElement> -
Constructor Summary
ConstructorsConstructorDescriptionLinksPageElement(List<LinksPageElement.Link> links, Optional<String> title, String text) Creates an instance of aLinksPageElementrecord 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.lay(FoliosLayout layout) Sets the page out: one or more pages, each drawn on its own.links()Returns the value of thelinksrecord 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
items, objectives, spread
-
Field Details
-
CODEC
-
-
Constructor Details
-
LinksPageElement
Creates an instance of aLinksPageElementrecord class.- Parameters:
links- the value for thelinksrecord componenttitle- the value for thetitlerecord componenttext- the value for thetextrecord 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
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
links
Returns the value of thelinksrecord component.- Returns:
- the value of the
linksrecord component
-
title
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-