Package edu.yu.marketmaker.model
Record Class ExternalOrder
java.lang.Object
java.lang.Record
edu.yu.marketmaker.model.ExternalOrder
- Record Components:
id- unique identifier for the ordersymbol- ticker symbolquantity- number of units to tradelimitPrice- maximum price for buy, minimum price for sellside- buy or sell
- All Implemented Interfaces:
Identifiable<UUID>,Serializable
public record ExternalOrder(UUID id, String symbol, int quantity, double limitPrice, Side side)
extends Record
implements Identifiable<UUID>, Serializable
An external order is a request submitted to the exchange.
Represents a buy or sell order with specified quantity and limit price.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExternalOrder(UUID id, String symbol, int quantity, double limitPrice, Side side) Creates an instance of aExternalOrderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getId()Returns the unique identifier for this entity.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.doubleReturns the value of thelimitPricerecord component.intquantity()Returns the value of thequantityrecord component.side()Returns the value of thesiderecord component.symbol()Returns the value of thesymbolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExternalOrder
Creates an instance of aExternalOrderrecord class.- Parameters:
id- the value for theidrecord componentsymbol- the value for thesymbolrecord componentquantity- the value for thequantityrecord componentlimitPrice- the value for thelimitPricerecord componentside- the value for thesiderecord component
-
-
Method Details
-
getId
Description copied from interface:IdentifiableReturns the unique identifier for this entity.- Specified by:
getIdin interfaceIdentifiable<UUID>- 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
symbol
Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
quantity
public int quantity()Returns the value of thequantityrecord component.- Returns:
- the value of the
quantityrecord component
-
limitPrice
public double limitPrice()Returns the value of thelimitPricerecord component.- Returns:
- the value of the
limitPricerecord component
-
side
Returns the value of thesiderecord component.- Returns:
- the value of the
siderecord component
-