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 -
Method Summary
Modifier and TypeMethodDescriptionaskerId()Returns the value of theaskerIdrecord component.Returns the value of theaskerNamerecord component.chunkKey()Returns the value of thechunkKeyrecord component.intchunkX()Returns the value of thechunkXrecord component.intchunkZ()Returns the value of thechunkZrecord component.longReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.booleanmessage()Returns the value of themessagerecord component.Returns the value of thequotedPricerecord component.longReturns the value of therepliedAtrecord component.Returns the value of therepliedByrecord component.Returns the value of therepliedByNamerecord component.final StringtoString()Returns a string representation of this record class.world()Returns the value of theworldrecord component.
-
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 aLandPriceInquiryrecord class.- Parameters:
id- the value for theidrecord componentaskerId- the value for theaskerIdrecord componentaskerName- the value for theaskerNamerecord componentchunkKey- the value for thechunkKeyrecord componentworld- the value for theworldrecord componentchunkX- the value for thechunkXrecord componentchunkZ- the value for thechunkZrecord componentmessage- the value for themessagerecord componentcreatedAt- the value for thecreatedAtrecord componentrepliedBy- the value for therepliedByrecord componentrepliedByName- the value for therepliedByNamerecord componentquotedPrice- the value for thequotedPricerecord componentrepliedAt- the value for therepliedAtrecord component
-
-
Method Details
-
withReply
-
isReplied
public boolean isReplied() -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
askerId
Returns the value of theaskerIdrecord component.- Returns:
- the value of the
askerIdrecord component
-
askerName
Returns the value of theaskerNamerecord component.- Returns:
- the value of the
askerNamerecord component
-
chunkKey
Returns the value of thechunkKeyrecord component.- Returns:
- the value of the
chunkKeyrecord component
-
world
Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord component
-
chunkX
public int chunkX()Returns the value of thechunkXrecord component.- Returns:
- the value of the
chunkXrecord component
-
chunkZ
public int chunkZ()Returns the value of thechunkZrecord component.- Returns:
- the value of the
chunkZrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
createdAt
public long createdAt()Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
repliedBy
Returns the value of therepliedByrecord component.- Returns:
- the value of the
repliedByrecord component
-
repliedByName
Returns the value of therepliedByNamerecord component.- Returns:
- the value of the
repliedByNamerecord component
-
quotedPrice
Returns the value of thequotedPricerecord component.- Returns:
- the value of the
quotedPricerecord component
-
repliedAt
public long repliedAt()Returns the value of therepliedAtrecord component.- Returns:
- the value of the
repliedAtrecord component
-