Record Class Records.TradeRecord
java.lang.Object
java.lang.Record
eds.database.Records.TradeRecord
- Record Components:
id- unique trade identifierrunId- id of the simulation run this trade belongs tobuyOrderId- id of the buy order involved in the tradesellOrderId- id of the sell order involved in the tradeprice- price at which the trade was executed- number of shares exchangedconclusionTime- simulation time at which the trade was concluded
- Enclosing class:
Records
-
Constructor Summary
ConstructorsConstructorDescriptionTradeRecord(String id, int runId, String buyOrderId, String sellOrderId, double price, int shareSize, double conclusionTime) Creates an instance of aTradeRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuyOrderIdrecord component.doubleReturns the value of theconclusionTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.doubleprice()Returns the value of thepricerecord component.intrunId()Returns the value of therunIdrecord component.Returns the value of thesellOrderIdrecord component.intReturns the value of theshareSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TradeRecord
public TradeRecord(String id, int runId, String buyOrderId, String sellOrderId, double price, int shareSize, double conclusionTime) Creates an instance of aTradeRecordrecord class.- Parameters:
id- the value for theidrecord componentrunId- the value for therunIdrecord componentbuyOrderId- the value for thebuyOrderIdrecord componentsellOrderId- the value for thesellOrderIdrecord componentprice- the value for thepricerecord componentshareSize- the value for theshareSizerecord componentconclusionTime- the value for theconclusionTimerecord 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. -
id
-
runId
-
buyOrderId
Returns the value of thebuyOrderIdrecord component.- Returns:
- the value of the
buyOrderIdrecord component
-
sellOrderId
Returns the value of thesellOrderIdrecord component.- Returns:
- the value of the
sellOrderIdrecord component
-
price
-
conclusionTime
public double conclusionTime()Returns the value of theconclusionTimerecord component.- Returns:
- the value of the
conclusionTimerecord component
-