File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
ta4j-core/src/main/java/org/ta4j/core Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,17 @@ default Num numOf(Number number) {
101101 }
102102
103103 /**
104- * @param i an index
104+ * Gets the bar from {@link #getBarData()} with index {@code i}.
105+ *
106+ * <p>
107+ * The given {@code i} can return the same bar within the first range of indices
108+ * due to {@link #setMaximumBarCount(int)}, for example: If you fill a BarSeries
109+ * with 30 bars and then apply a {@code maximumBarCount} of 10 bars, the first
110+ * 20 bars will be removed from the BarSeries. The indices going further from 0
111+ * to 29 remain but return the same bar from 0 to 20. The remaining 9 bars are
112+ * returned from index 21.
113+ *
114+ * @param i the index
105115 * @return the bar at the i-th position
106116 */
107117 Bar getBar (int i );
@@ -184,8 +194,9 @@ default String getSeriesPeriodDescription() {
184194 *
185195 * If a new bar is added to the series such that the number of bars will exceed
186196 * the maximum bar count, then the FIRST bar in the series is automatically
187- * removed, ensuring that the maximum bar count is not exceeded.
188- *
197+ * removed, ensuring that the maximum bar count is not exceeded. The indices of
198+ * the bar series do not change.
199+ *
189200 * @param maximumBarCount the maximum bar count
190201 */
191202 void setMaximumBarCount (int maximumBarCount );
You can’t perform that action at this time.
0 commit comments