/** * Adds a new monetary value of the cost basi. * * @param money monetary value of the cost basi */ public void addMoney(Money money) { getMoney().add(money); }
/** * Returns the monetary value of the cost basis. * * @return monetary value of the cost basis */ public List<Money> getMoney() { return getRepeatingExtension(Money.class); }
/** * Returns whether it has the monetary value of the cost basis. * * @return whether it has the monetary value of the cost basis */ public boolean hasMoney() { return hasRepeatingExtension(Money.class); }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(PositionData.class)) { return; } extProfile.declare(PositionData.class, CostBasis.class); new CostBasis().declareExtensions(extProfile); extProfile.declare(PositionData.class, DaysGain.class); new DaysGain().declareExtensions(extProfile); extProfile.declare(PositionData.class, Gain.class); new Gain().declareExtensions(extProfile); extProfile.declare(PositionData.class, MarketValue.class); new MarketValue().declareExtensions(extProfile); }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(PositionData.class)) { return; } extProfile.declare(PositionData.class, CostBasis.class); new CostBasis().declareExtensions(extProfile); extProfile.declare(PositionData.class, DaysGain.class); new DaysGain().declareExtensions(extProfile); extProfile.declare(PositionData.class, Gain.class); new Gain().declareExtensions(extProfile); extProfile.declare(PositionData.class, MarketValue.class); new MarketValue().declareExtensions(extProfile); }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(PortfolioData.class)) { return; } extProfile.declare(PortfolioData.class, CostBasis.class); new CostBasis().declareExtensions(extProfile); extProfile.declare(PortfolioData.class, DaysGain.class); new DaysGain().declareExtensions(extProfile); extProfile.declare(PortfolioData.class, Gain.class); new Gain().declareExtensions(extProfile); extProfile.declare(PortfolioData.class, MarketValue.class); new MarketValue().declareExtensions(extProfile); }
/** * Returns whether it has the monetary value of the cost basis. * * @return whether it has the monetary value of the cost basis */ public boolean hasMoney() { return hasRepeatingExtension(Money.class); }
/** * Adds a new monetary value of the cost basi. * * @param money monetary value of the cost basi */ public void addMoney(Money money) { getMoney().add(money); }
/** * Returns the monetary value of the cost basis. * * @return monetary value of the cost basis */ public List<Money> getMoney() { return getRepeatingExtension(Money.class); }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(PortfolioData.class)) { return; } extProfile.declare(PortfolioData.class, CostBasis.class); new CostBasis().declareExtensions(extProfile); extProfile.declare(PortfolioData.class, DaysGain.class); new DaysGain().declareExtensions(extProfile); extProfile.declare(PortfolioData.class, Gain.class); new Gain().declareExtensions(extProfile); extProfile.declare(PortfolioData.class, MarketValue.class); new MarketValue().declareExtensions(extProfile); }