Record Class WrittenBookContent
java.lang.Object
java.lang.Record
net.minestom.server.item.component.WrittenBookContent
public record WrittenBookContent(FilteredText<String> title, String author, int generation, List<FilteredText<Component>> pages, boolean resolved)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<WrittenBookContent> static final WrittenBookContentstatic final NetworkBuffer.Type<WrittenBookContent> -
Constructor Summary
ConstructorsConstructorDescriptionWrittenBookContent(String title, String author, int generation, List<Component> pages, boolean resolved) WrittenBookContent(String title, String author, List<Component> pages) WrittenBookContent(FilteredText<String> title, String author, int generation, List<FilteredText<Component>> pages, boolean resolved) Creates an instance of aWrittenBookContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.pages()Returns the value of thepagesrecord component.booleanresolved()Returns the value of theresolvedrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
WrittenBookContent
public WrittenBookContent(FilteredText<String> title, String author, int generation, List<FilteredText<Component>> pages, boolean resolved) Creates an instance of aWrittenBookContentrecord class.- Parameters:
title- the value for thetitlerecord componentauthor- the value for theauthorrecord componentgeneration- the value for thegenerationrecord componentpages- the value for thepagesrecord componentresolved- the value for theresolvedrecord component
-
WrittenBookContent
-
WrittenBookContent
-
-
Method Details
-
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. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
generation
public int generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
resolved
public boolean resolved()Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-