Record Class MarketDataEvent
java.lang.Object
java.lang.Record
com.quantfinlib.marketdata.MarketDataEvent
-
Constructor Summary
ConstructorsConstructorDescriptionMarketDataEvent(String symbol, double price, double volume, long timestampNanos) Creates an instance of aMarketDataEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleprice()Returns the value of thepricerecord component.symbol()Returns the value of thesymbolrecord component.longReturns the value of thetimestampNanosrecord component.final StringtoString()Returns a string representation of this record class.doublevolume()Returns the value of thevolumerecord component.
-
Constructor Details
-
MarketDataEvent
Creates an instance of aMarketDataEventrecord class.- Parameters:
symbol- the value for thesymbolrecord componentprice- the value for thepricerecord componentvolume- the value for thevolumerecord componenttimestampNanos- the value for thetimestampNanosrecord 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. -
symbol
Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
price
public double price()Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
volume
public double volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
timestampNanos
public long timestampNanos()Returns the value of thetimestampNanosrecord component.- Returns:
- the value of the
timestampNanosrecord component
-