Skip to content

Commit

Permalink
Add missing Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
jfree committed Dec 31, 2020
1 parent 629ee86 commit f37e0fc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/org/jfree/data/KeyedValuesItemKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
18 changes: 17 additions & 1 deletion src/main/java/org/jfree/data/time/TimeSeries.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f37e0fc

Please sign in to comment.