Record Class WrittenBook
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.WrittenBook
public record WrittenBook(FilterableString title, String author, int generation, FilterableComponent[] pages, boolean resolved)
extends Record
-
Field Summary
-
Constructor Summary
ConstructorDescriptionWrittenBook
(FilterableString title, String author, int generation, FilterableComponent[] pages, boolean resolved) Creates an instance of aWrittenBook
record class. -
Method Summary
Modifier and TypeMethodDescriptionauthor()
Returns the value of theauthor
record component.final boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thegeneration
record component.final int
hashCode()
Returns a hash code value for this object.pages()
Returns the value of thepages
record component.boolean
resolved()
Returns the value of theresolved
record component.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
WrittenBook
public WrittenBook(FilterableString title, String author, int generation, FilterableComponent[] pages, boolean resolved) Creates an instance of aWrittenBook
record class.- Parameters:
title
- the value for thetitle
record componentauthor
- the value for theauthor
record componentgeneration
- the value for thegeneration
record componentpages
- the value for thepages
record componentresolved
- the value for theresolved
record component
-
-
Method Details
-
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 '=='. -
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
author
Returns the value of theauthor
record component.- Returns:
- the value of the
author
record component
-
generation
public int generation()Returns the value of thegeneration
record component.- Returns:
- the value of the
generation
record component
-
pages
Returns the value of thepages
record component.- Returns:
- the value of the
pages
record component
-
resolved
public boolean resolved()Returns the value of theresolved
record component.- Returns:
- the value of the
resolved
record component
-