Record Class LandPriceInquiry

java.lang.Object
java.lang.Record
net.chen.legacyLand.resource.pricing.LandPriceInquiry

public record LandPriceInquiry(long id, UUID askerId, String askerName, String chunkKey, String world, int chunkX, int chunkZ, String message, long createdAt, UUID repliedBy, String repliedByName, Double quotedPrice, long repliedAt) extends Record
一次地价询问记录(P3)。

由 /landprice ask 创建,等待目标地块所属城镇任一成员通过 /landprice reply 给出报价。LandPriceManager 内存持有, 超过 TTL 自动清理。

  • Constructor Summary

    Constructors
    Constructor
    Description
    LandPriceInquiry(long id, UUID askerId, String askerName, String chunkKey, String world, int chunkX, int chunkZ, String message, long createdAt, UUID repliedBy, String repliedByName, Double quotedPrice, long repliedAt)
    Creates an instance of a LandPriceInquiry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the askerId record component.
    Returns the value of the askerName record component.
    Returns the value of the chunkKey record component.
    int
    Returns the value of the chunkX record component.
    int
    Returns the value of the chunkZ record component.
    long
    Returns the value of the createdAt record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    id()
    Returns the value of the id record component.
    boolean
     
    Returns the value of the message record component.
    Returns the value of the quotedPrice record component.
    long
    Returns the value of the repliedAt record component.
    Returns the value of the repliedBy record component.
    Returns the value of the repliedByName record component.
    final String
    Returns a string representation of this record class.
    withReply(UUID replier, String replierName, double price, long now)
     
    Returns the value of the world record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LandPriceInquiry

      public LandPriceInquiry(long id, UUID askerId, String askerName, String chunkKey, String world, int chunkX, int chunkZ, String message, long createdAt, UUID repliedBy, String repliedByName, Double quotedPrice, long repliedAt)
      Creates an instance of a LandPriceInquiry record class.
      Parameters:
      id - the value for the id record component
      askerId - the value for the askerId record component
      askerName - the value for the askerName record component
      chunkKey - the value for the chunkKey record component
      world - the value for the world record component
      chunkX - the value for the chunkX record component
      chunkZ - the value for the chunkZ record component
      message - the value for the message record component
      createdAt - the value for the createdAt record component
      repliedBy - the value for the repliedBy record component
      repliedByName - the value for the repliedByName record component
      quotedPrice - the value for the quotedPrice record component
      repliedAt - the value for the repliedAt record component
  • Method Details

    • withReply

      public LandPriceInquiry withReply(UUID replier, String replierName, double price, long now)
    • isReplied

      public boolean isReplied()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • askerId

      public UUID askerId()
      Returns the value of the askerId record component.
      Returns:
      the value of the askerId record component
    • askerName

      public String askerName()
      Returns the value of the askerName record component.
      Returns:
      the value of the askerName record component
    • chunkKey

      public String chunkKey()
      Returns the value of the chunkKey record component.
      Returns:
      the value of the chunkKey record component
    • world

      public String world()
      Returns the value of the world record component.
      Returns:
      the value of the world record component
    • chunkX

      public int chunkX()
      Returns the value of the chunkX record component.
      Returns:
      the value of the chunkX record component
    • chunkZ

      public int chunkZ()
      Returns the value of the chunkZ record component.
      Returns:
      the value of the chunkZ record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • createdAt

      public long createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • repliedBy

      public UUID repliedBy()
      Returns the value of the repliedBy record component.
      Returns:
      the value of the repliedBy record component
    • repliedByName

      public String repliedByName()
      Returns the value of the repliedByName record component.
      Returns:
      the value of the repliedByName record component
    • quotedPrice

      public Double quotedPrice()
      Returns the value of the quotedPrice record component.
      Returns:
      the value of the quotedPrice record component
    • repliedAt

      public long repliedAt()
      Returns the value of the repliedAt record component.
      Returns:
      the value of the repliedAt record component