Package edu.yu.marketmaker.model
Record Class Quote
java.lang.Object
java.lang.Record
edu.yu.marketmaker.model.Quote
- All Implemented Interfaces:
Identifiable<String>,Serializable
public record Quote(String symbol, double bidPrice, int bidQuantity, double askPrice, int askQuantity, UUID quoteId, long expiresAt)
extends Record
implements Identifiable<String>, Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleaskPrice()Returns the value of theaskPricerecord component.intReturns the value of theaskQuantityrecord component.doublebidPrice()Returns the value of thebidPricerecord component.intReturns the value of thebidQuantityrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpiresAtrecord component.getId()Returns the unique identifier for this entity.final inthashCode()Returns a hash code value for this object.quoteId()Returns the value of thequoteIdrecord component.symbol()Returns the value of thesymbolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Quote
public Quote(String symbol, double bidPrice, int bidQuantity, double askPrice, int askQuantity, UUID quoteId, long expiresAt) Creates an instance of aQuoterecord class.- Parameters:
symbol- the value for thesymbolrecord componentbidPrice- the value for thebidPricerecord componentbidQuantity- the value for thebidQuantityrecord componentaskPrice- the value for theaskPricerecord componentaskQuantity- the value for theaskQuantityrecord componentquoteId- the value for thequoteIdrecord componentexpiresAt- the value for theexpiresAtrecord component
-
-
Method Details
-
getId
Description copied from interface:IdentifiableReturns the unique identifier for this entity.- Specified by:
getIdin interfaceIdentifiable<String>- Returns:
- the unique key
-
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 '=='. -
symbol
Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
bidPrice
public double bidPrice()Returns the value of thebidPricerecord component.- Returns:
- the value of the
bidPricerecord component
-
bidQuantity
public int bidQuantity()Returns the value of thebidQuantityrecord component.- Returns:
- the value of the
bidQuantityrecord component
-
askPrice
public double askPrice()Returns the value of theaskPricerecord component.- Returns:
- the value of the
askPricerecord component
-
askQuantity
public int askQuantity()Returns the value of theaskQuantityrecord component.- Returns:
- the value of the
askQuantityrecord component
-
quoteId
Returns the value of thequoteIdrecord component.- Returns:
- the value of the
quoteIdrecord component
-
expiresAt
public long expiresAt()Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-