/** * Returns the today's gain for the position in the portfolio default currency * (and exchange currency if it differs). * * @return today's gain for the position in the portfolio default currency * (and exchange currency if it differs) */ public DaysGain getDaysGain() { return getExtension(DaysGain.class); }
/** * Returns whether it has the percentage gain. * * @return whether it has the percentage gain */ public boolean hasGainPercentage() { return getGainPercentage() != null; }
/** * Returns whether it has the 1 week return (percentage). * * @return whether it has the 1 week return (percentage) */ public boolean hasReturn1w() { return getReturn1w() != null; }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(PositionEntry.class)) { return; } super.declareExtensions(extProfile); extProfile.declare(PositionEntry.class, PositionFeedLink.class); new PositionFeedLink().declareExtensions(extProfile); extProfile.declare(PositionEntry.class, PositionData.getDefaultDescription(true, false)); new PositionData().declareExtensions(extProfile); extProfile.declare(PositionEntry.class, Symbol.getDefaultDescription(true, false)); }
/** * Returns whether it has the 3 year return (percentage). * * @return whether it has the 3 year return (percentage) */ public boolean hasReturn3y() { return getReturn3y() != null; }
/** * Returns whether it has the 4 week return (percentage). * * @return whether it has the 4 week return (percentage) */ public boolean hasReturn4w() { return getReturn4w() != null; }
/** * Returns whether it has the 3 month return (percentage). * * @return whether it has the 3 month return (percentage) */ public boolean hasReturn3m() { return getReturn3m() != null; }
/** * Returns whether it has the 1 year return (percentage). * * @return whether it has the 1 year return (percentage) */ public boolean hasReturn1y() { return getReturn1y() != null; }
@Override public void declareExtensions(ExtensionProfile extProfile) { if (extProfile.isDeclared(PositionEntry.class)) { return; } super.declareExtensions(extProfile); extProfile.declare(PositionEntry.class, PositionFeedLink.class); new PositionFeedLink().declareExtensions(extProfile); extProfile.declare(PositionEntry.class, PositionData.getDefaultDescription(true, false)); new PositionData().declareExtensions(extProfile); extProfile.declare(PositionEntry.class, Symbol.getDefaultDescription(true, false)); }
/** * Returns whether it has the 3 year return (percentage). * * @return whether it has the 3 year return (percentage) */ public boolean hasReturn3y() { return getReturn3y() != null; }
/** * Returns whether it has the 4 week return (percentage). * * @return whether it has the 4 week return (percentage) */ public boolean hasReturn4w() { return getReturn4w() != null; }
/** * Returns whether it has the 3 month return (percentage). * * @return whether it has the 3 month return (percentage) */ public boolean hasReturn3m() { return getReturn3m() != null; }
/** * Returns whether it has the 1 year return (percentage). * * @return whether it has the 1 year return (percentage) */ public boolean hasReturn1y() { return getReturn1y() != null; }
/** * Returns the gain for the position in the portfolio default currency (and * exchange currency if it differs). * * @return gain for the position in the portfolio default currency (and * exchange currency if it differs) */ public Gain getGain() { return getExtension(Gain.class); }
/** * Returns whether it has the 1 week return (percentage). * * @return whether it has the 1 week return (percentage) */ public boolean hasReturn1w() { return getReturn1w() != null; }
/** * Returns whether it has the percentage gain. * * @return whether it has the percentage gain */ public boolean hasGainPercentage() { return getGainPercentage() != null; }
/** * Returns the cost basis of the position in the portfolio default currency * (and exchange currency if it differs). * * @return cost basis of the position in the portfolio default currency (and * exchange currency if it differs) */ public CostBasis getCostBasis() { return getExtension(CostBasis.class); }
/** * Returns the today's gain for the position in the portfolio default currency * (and exchange currency if it differs). * * @return today's gain for the position in the portfolio default currency * (and exchange currency if it differs) */ public DaysGain getDaysGain() { return getExtension(DaysGain.class); }
/** * Returns the market value of the position in the portfolio default currency * (and exchange currency if it differs). * * @return market value of the position in the portfolio default currency (and * exchange currency if it differs) */ public MarketValue getMarketValue() { return getExtension(MarketValue.class); }
/** * Returns the gain for the position in the portfolio default currency (and * exchange currency if it differs). * * @return gain for the position in the portfolio default currency (and * exchange currency if it differs) */ public Gain getGain() { return getExtension(Gain.class); }