/** * Immutable constructor. * * @param date date at which the transaction occurred. * @param notes notes. * @param shares number of shares involved in the transaction. * @param type type for the transaction (can be "Buy", "Sell", "Buy to Cover" * or "Sell Short"). */ public TransactionData(DateTime date, String notes, Double shares, String type) { super(); setDate(date); setNotes(notes); setShares(shares); setType(type); setImmutable(true); }
/** * Immutable constructor. * * @param date date at which the transaction occurred. * @param notes notes. * @param shares number of shares involved in the transaction. * @param type type for the transaction (can be "Buy", "Sell", "Buy to Cover" * or "Sell Short"). */ public TransactionData(DateTime date, String notes, Double shares, String type) { super(); setDate(date); setNotes(notes); setShares(shares); setType(type); setImmutable(true); }
data.setType(type); if (!date.equals("")) data.setDate(DateTime.parseDateTime(date + "T00:00:00.000Z")); if (!shares.equals("")) data.setShares(Double.valueOf(shares).doubleValue()); if (!price.equals("")) { Price p = new Price();
data.setType(type); if (!date.equals("")) data.setDate(DateTime.parseDateTime(date + "T00:00:00.000Z")); if (!shares.equals("")) data.setShares(Double.valueOf(shares).doubleValue()); if (!price.equals("")) { Price p = new Price();