Record Class AuctionSimulator.AuctionResult
java.lang.Object
java.lang.Record
org.episteme.social.economics.AuctionSimulator.AuctionResult
- All Implemented Interfaces:
Serializable
- Enclosing class:
AuctionSimulator
public static record AuctionSimulator.AuctionResult(String winnerId, Real winningBid, Real sellerRevenue, int rounds, List<AuctionSimulator.Bid> bidHistory)
extends Record
implements Serializable
Result summary for a completed auction simulation.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAuctionResult(String winnerId, Real winningBid, Real sellerRevenue, int rounds, List<AuctionSimulator.Bid> bidHistory) Creates an instance of aAuctionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebidHistoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.introunds()Returns the value of theroundsrecord component.Returns the value of thesellerRevenuerecord component.final StringtoString()Returns a string representation of this record class.winnerId()Returns the value of thewinnerIdrecord component.Returns the value of thewinningBidrecord component.
-
Constructor Details
-
AuctionResult
public AuctionResult(String winnerId, Real winningBid, Real sellerRevenue, int rounds, List<AuctionSimulator.Bid> bidHistory) Creates an instance of aAuctionResultrecord class.- Parameters:
winnerId- the value for thewinnerIdrecord componentwinningBid- the value for thewinningBidrecord componentsellerRevenue- the value for thesellerRevenuerecord componentrounds- the value for theroundsrecord componentbidHistory- the value for thebidHistoryrecord component
-
-
Method Details
-
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. -
winnerId
Returns the value of thewinnerIdrecord component.- Returns:
- the value of the
winnerIdrecord component
-
winningBid
Returns the value of thewinningBidrecord component.- Returns:
- the value of the
winningBidrecord component
-
sellerRevenue
Returns the value of thesellerRevenuerecord component.- Returns:
- the value of the
sellerRevenuerecord component
-
rounds
public int rounds()Returns the value of theroundsrecord component.- Returns:
- the value of the
roundsrecord component
-
bidHistory
Returns the value of thebidHistoryrecord component.- Returns:
- the value of the
bidHistoryrecord component
-