From f37e0fcfb551e97b5f085d5f61be5ca5b5741bbc Mon Sep 17 00:00:00 2001 From: David Gilbert Date: Thu, 31 Dec 2020 16:10:38 +0100 Subject: [PATCH] Add missing Javadocs --- .../org/jfree/data/KeyedValuesItemKey.java | 3 +++ .../java/org/jfree/data/time/TimeSeries.java | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jfree/data/KeyedValuesItemKey.java b/src/main/java/org/jfree/data/KeyedValuesItemKey.java index bed084409..87e19c95b 100644 --- a/src/main/java/org/jfree/data/KeyedValuesItemKey.java +++ b/src/main/java/org/jfree/data/KeyedValuesItemKey.java @@ -39,6 +39,9 @@ import java.io.Serializable; import org.jfree.chart.util.Args; +/** + * A reference to a specific item in a {@link KeyedValues} data structure. + */ public class KeyedValuesItemKey implements ItemKey, Serializable { /** The key for the item. */ diff --git a/src/main/java/org/jfree/data/time/TimeSeries.java b/src/main/java/org/jfree/data/time/TimeSeries.java index 9a1422a6a..c1d338d7b 100644 --- a/src/main/java/org/jfree/data/time/TimeSeries.java +++ b/src/main/java/org/jfree/data/time/TimeSeries.java @@ -344,7 +344,23 @@ public Range findValueRange(Range xRange, TimePeriodAnchor xAnchor, return findValueRange(xRange, xAnchor, calendar); } - public Range findValueRange(Range xRange, TimePeriodAnchor xAnchor, Calendar calendar) { + /** + * Finds the range of y-values that fall within the specified range of + * x-values (where the x-values are interpreted as milliseconds since the + * epoch and converted to time periods using the specified calendar). + * + * @param xRange the subset of x-values to use ({@code null} not + * permitted). + * @param xAnchor the anchor point for the x-values ({@code null} + * not permitted). + * @param calendar the calendar ({@code null} not permitted). + * + * @return The range of y-values. + * + * @since 1.0.18 + */ + public Range findValueRange(Range xRange, TimePeriodAnchor xAnchor, + Calendar calendar) { // since the items are ordered, we could be more clever here and avoid // iterating over all the data double lowY = Double.POSITIVE_INFINITY;