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 Details

    • AuctionResult

      public AuctionResult(String winnerId, Real winningBid, Real sellerRevenue, int rounds, List<AuctionSimulator.Bid> bidHistory)
      Creates an instance of a AuctionResult record class.
      Parameters:
      winnerId - the value for the winnerId record component
      winningBid - the value for the winningBid record component
      sellerRevenue - the value for the sellerRevenue record component
      rounds - the value for the rounds record component
      bidHistory - the value for the bidHistory record component
  • Method Details

    • 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.
    • winnerId

      public String winnerId()
      Returns the value of the winnerId record component.
      Returns:
      the value of the winnerId record component
    • winningBid

      public Real winningBid()
      Returns the value of the winningBid record component.
      Returns:
      the value of the winningBid record component
    • sellerRevenue

      public Real sellerRevenue()
      Returns the value of the sellerRevenue record component.
      Returns:
      the value of the sellerRevenue record component
    • rounds

      public int rounds()
      Returns the value of the rounds record component.
      Returns:
      the value of the rounds record component
    • bidHistory

      public List<AuctionSimulator.Bid> bidHistory()
      Returns the value of the bidHistory record component.
      Returns:
      the value of the bidHistory record component