@Test public void testEqualsForEntryOrders() { Trade trLeft = newTrade; Trade trRightEquals = new Trade(); Trade trRightNotEquals = new Trade(); assertEquals(OrderType.BUY, trRightNotEquals.operate(2).getType()); assertNotEquals(trLeft, trRightNotEquals); assertEquals(OrderType.BUY, trLeft.operate(1).getType()); assertEquals(OrderType.BUY, trRightEquals.operate(1).getType()); assertEquals(trLeft, trRightEquals); assertNotEquals(trLeft, trRightNotEquals); }
public Order operate(int index) { return operate(index, NaN, NaN); }
Trade implements Serializable { public Order operate(int index) { return operate(index, NaN, NaN); } }
Trade implements Serializable { public Order operate(int index) { return operate(index, NaN, NaN); } Trade();  Trade(OrderType startingType);  Trade(OrderType startingType, CostModel transactionCostModel, CostModel holdingCostModel);  Trade(Order entry, Order exit);  Trade(Order entry, Order exit, CostModel transactionCostModel, CostModel holdingCostModel); }
Trade implements Serializable { public Order operate(int index) { return operate(index, NaN, NaN); } Trade();  Trade(OrderType startingType);  Trade(OrderType startingType, CostModel transactionCostModel, CostModel holdingCostModel);  Trade(Order entry, Order exit);  Trade(Order entry, Order exit, CostModel transactionCostModel, CostModel holdingCostModel); Order getEntry(); Order getExit(); @Override boolean equals(Object obj); @Override int hashCode(); Order operate(int index); Order operate(int index, Num price, Num amount); boolean isClosed(); boolean isOpened(); boolean isNew(); @Override String toString(); Num getProfit(); Num getProfit(int finalIndex, Num finalPrice); Num getTradeCost(int finalIndex); Num getTradeCost(); Num getHoldingCost(); Num getHoldingCost(int finalIndex); }
Trade implements Serializable { public Order operate(int index) { return operate(index, NaN, NaN); } Trade();  Trade(OrderType startingType);  Trade(OrderType startingType, CostModel transactionCostModel, CostModel holdingCostModel);  Trade(Order entry, Order exit);  Trade(Order entry, Order exit, CostModel transactionCostModel, CostModel holdingCostModel); Order getEntry(); Order getExit(); @Override boolean equals(Object obj); @Override int hashCode(); Order operate(int index); Order operate(int index, Num price, Num amount); boolean isClosed(); boolean isOpened(); boolean isNew(); @Override String toString(); Num getProfit(); Num getProfit(int finalIndex, Num finalPrice); Num getTradeCost(int finalIndex); Num getTradeCost(); Num getHoldingCost(); Num getHoldingCost(int finalIndex);  }