Package jakarta.nosql.tck.entities
Record Class Book
java.lang.Object
java.lang.Record
jakarta.nosql.tck.entities.Book
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()
Returns the value of theauthor
record component.final boolean
Indicates whether some other object is "equal to" this one.genre()
Returns the value of thegenre
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.static Book
of
(net.datafaker.Faker faker) Returns the value of thepublisher
record component.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Book
Creates an instance of aBook
record class.- Parameters:
id
- the value for theid
record componenttitle
- the value for thetitle
record componentauthor
- the value for theauthor
record componentpublisher
- the value for thepublisher
record componentgenre
- the value for thegenre
record component
-
-
Method Details
-
of
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
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
-
publisher
Returns the value of thepublisher
record component.- Returns:
- the value of the
publisher
record component
-
genre
Returns the value of thegenre
record component.- Returns:
- the value of the
genre
record component
-