Package de.chojo.universalis.entities
Record Class Listing
java.lang.Object
java.lang.Record
de.chojo.universalis.entities.Listing
- Record Components:
lastReviewTime
- The time that this listing was posted.world
- the worldcreator
- the creatormeta
- item metaretainer
- the retainer dataprice
- the pricelistingId
- A SHA256 hash of the ID of this listing. Due to some current client-side bugs, this will almost always be null.onMannequin
- Whether the item is being sold on a mannequin.sellerId
- A SHA256 hash of the seller's ID.tax
- The tax that will be added on top of the price.
public record Listing(LocalDateTime lastReviewTime, World world, Creator creator, ItemMeta meta, String listingId, boolean onMannequin, Retainer retainer, String sellerId, Price price, int tax)
extends Record
A listing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreator()
Returns the value of thecreator
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelastReviewTime
record component.Returns the value of thelistingId
record component.meta()
Returns the value of themeta
record component.boolean
Returns the value of theonMannequin
record component.price()
Returns the value of theprice
record component.retainer()
Returns the value of theretainer
record component.sellerId()
Returns the value of thesellerId
record component.int
tax()
Returns the value of thetax
record component.final String
toString()
Returns a string representation of this record class.world()
Returns the value of theworld
record component.
-
Constructor Details
-
Listing
public Listing(LocalDateTime lastReviewTime, World world, Creator creator, ItemMeta meta, String listingId, boolean onMannequin, Retainer retainer, String sellerId, Price price, int tax) Creates an instance of aListing
record class.- Parameters:
lastReviewTime
- the value for thelastReviewTime
record componentworld
- the value for theworld
record componentcreator
- the value for thecreator
record componentmeta
- the value for themeta
record componentlistingId
- the value for thelistingId
record componentonMannequin
- the value for theonMannequin
record componentretainer
- the value for theretainer
record componentsellerId
- the value for thesellerId
record componentprice
- the value for theprice
record componenttax
- the value for thetax
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 '=='. -
lastReviewTime
Returns the value of thelastReviewTime
record component.- Returns:
- the value of the
lastReviewTime
record component
-
world
Returns the value of theworld
record component.- Returns:
- the value of the
world
record component
-
creator
Returns the value of thecreator
record component.- Returns:
- the value of the
creator
record component
-
meta
Returns the value of themeta
record component.- Returns:
- the value of the
meta
record component
-
listingId
Returns the value of thelistingId
record component.- Returns:
- the value of the
listingId
record component
-
onMannequin
public boolean onMannequin()Returns the value of theonMannequin
record component.- Returns:
- the value of the
onMannequin
record component
-
retainer
Returns the value of theretainer
record component.- Returns:
- the value of the
retainer
record component
-
sellerId
Returns the value of thesellerId
record component.- Returns:
- the value of the
sellerId
record component
-
price
Returns the value of theprice
record component.- Returns:
- the value of the
price
record component
-
tax
public int tax()Returns the value of thetax
record component.- Returns:
- the value of the
tax
record component
-