Package com.tnsai.coordination.auction
Record Class Bid
java.lang.Object
java.lang.Record
com.tnsai.coordination.auction.Bid
- Record Components:
agent- the bidding agentvalue- the bid value (interpretation depends on auction type)round- the auction round this bid belongs totimestamp- when the bid was submitted
public record Bid(com.tnsai.agents.Agent agent, double value, int round, Instant timestamp)
extends Record
A bid submitted by an agent in an auction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.tnsai.agents.Agentagent()Returns the value of theagentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static Bidof(com.tnsai.agents.Agent agent, double value, int round) Creates a bid for the current round with auto-timestamp.intround()Returns the value of theroundrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.doublevalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
of
Creates a bid for the current round with auto-timestamp. -
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 '=='. -
agent
public com.tnsai.agents.Agent agent()Returns the value of theagentrecord component.- Returns:
- the value of the
agentrecord component
-
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
round
public int round()Returns the value of theroundrecord component.- Returns:
- the value of the
roundrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-