Record Class SpotInstrument
java.lang.Object
java.lang.Record
com.wualabs.qtsurfer.engine.core.instrument.SpotInstrument
- Record Components:
base- base currency, e.g."BTC"quote- quote currency, e.g."USDT"
- All Implemented Interfaces:
Instrument
public record SpotInstrument(@NonNull String base, @NonNull String quote)
extends Record
implements Instrument
A spot pair, settled in nothing:
BTC/USDT.
Prefer Instrument.of(String, String) over this constructor. Neither accepts a null or
blank component.
-
Constructor Summary
ConstructorsConstructorDescriptionSpotInstrument(@NonNull String base, @NonNull String quote) Creates an instance of aSpotInstrumentrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull Stringbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull Stringquote()Returns the value of thequoterecord component.symbol()CCXT-style canonical string.toString()Returns a string representation of this record class.Methods inherited from interface Instrument
isDated, isDerivative
-
Constructor Details
-
SpotInstrument
-
-
Method Details
-
symbol
Description copied from interface:InstrumentCCXT-style canonical string. Inverse ofInstrument.parse(String).- Specified by:
symbolin interfaceInstrument
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
base
Returns the value of thebaserecord component.- Specified by:
basein interfaceInstrument- Returns:
- the value of the
baserecord component
-
quote
Returns the value of thequoterecord component.- Specified by:
quotein interfaceInstrument- Returns:
- the value of the
quoterecord component
-