本文整理了Java中co.vaughnvernon.tradercommon.quote.Quote.quantity
方法的一些代码示例,展示了Quote.quantity
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quote.quantity
方法的具体详情如下:
包路径:co.vaughnvernon.tradercommon.quote.Quote
类名称:Quote
方法名:quantity
暂无
代码示例来源:origin: VaughnVernon/IDDD_NYSE
public AlgoOrder(
String anOrderId,
OrderType aType,
Quote aQuote) {
super();
if (aQuote.quantity() < 500) {
throw new IllegalArgumentException("Cannot be less than 500 shares.");
}
this.setOrderId(anOrderId);
this.setType(aType);
this.setQuote(aQuote);
this.setSharesRemaining(new BigDecimal(aQuote.quantity()));
}
代码示例来源:origin: VaughnVernon/IDDD_NYSE
@Override
public boolean equals(Object anObject) {
boolean equalObjects = false;
if (anObject != null && this.getClass() == anObject.getClass()) {
Quote typedObject = (Quote) anObject;
equalObjects =
this.tickerSymbol().equals(typedObject.tickerSymbol()) &&
this.price().equals(typedObject.price()) &&
this.quantity() == typedObject.quantity();
}
return equalObjects;
}
代码示例来源:origin: VaughnVernon/IDDD_NYSE
@Override
public int hashCode() {
int hashCodeValue =
+ (75931 * 41)
+ this.tickerSymbol().hashCode()
+ this.price().hashCode()
+ this.quantity();
return hashCodeValue;
}
代码示例来源:origin: VaughnVernon/IDDD_NYSE
private void filled() {
if (this.isFilled()) {
throw new IllegalStateException("Algo order is already filled.");
}
if (this.hasSharesRemaining()) {
throw new IllegalStateException("Algo order is not yet filled.");
}
this.setFill(
new Fill(
this.quote().price(),
new BigDecimal(this.quote().quantity()),
new Date()));
DomainEventPublisher
.instance()
.publish(new AlgoOrderFilled(
this.orderId(),
this.type().name(),
this.quote()));
}
代码示例来源:origin: VaughnVernon/IDDD_NYSE
int totalQuantity = this.algoOrder.quote().quantity();
代码示例来源:origin: VaughnVernon/IDDD_NYSE
assertEquals(algoOrder.quote().quantity(), algoOrder.fill().quantity().intValue());
assertNotNull(algoOrder.fill().filledOn());
内容来源于网络,如有侵权,请联系作者删除!