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 thecreatorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastReviewTimerecord component.Returns the value of thelistingIdrecord component.meta()Returns the value of themetarecord component.booleanReturns the value of theonMannequinrecord component.price()Returns the value of thepricerecord component.retainer()Returns the value of theretainerrecord component.sellerId()Returns the value of thesellerIdrecord component.inttax()Returns the value of thetaxrecord component.final StringtoString()Returns a string representation of this record class.world()Returns the value of theworldrecord 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 aListingrecord class.- Parameters:
lastReviewTime- the value for thelastReviewTimerecord componentworld- the value for theworldrecord componentcreator- the value for thecreatorrecord componentmeta- the value for themetarecord componentlistingId- the value for thelistingIdrecord componentonMannequin- the value for theonMannequinrecord componentretainer- the value for theretainerrecord componentsellerId- the value for thesellerIdrecord componentprice- the value for thepricerecord componenttax- the value for thetaxrecord 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 thelastReviewTimerecord component.- Returns:
- the value of the
lastReviewTimerecord component
-
world
Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord component
-
creator
Returns the value of thecreatorrecord component.- Returns:
- the value of the
creatorrecord component
-
meta
Returns the value of themetarecord component.- Returns:
- the value of the
metarecord component
-
listingId
Returns the value of thelistingIdrecord component.- Returns:
- the value of the
listingIdrecord component
-
onMannequin
public boolean onMannequin()Returns the value of theonMannequinrecord component.- Returns:
- the value of the
onMannequinrecord component
-
retainer
Returns the value of theretainerrecord component.- Returns:
- the value of the
retainerrecord component
-
sellerId
Returns the value of thesellerIdrecord component.- Returns:
- the value of the
sellerIdrecord component
-
price
Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
tax
public int tax()Returns the value of thetaxrecord component.- Returns:
- the value of the
taxrecord component
-