null
not permitted).
*/
public XIntervalSeries(Comparable key) {
this(key, true, true);
}
/**
* Constructs a new xy-series that contains no data. You can specify
* whether or not duplicate x-values are allowed for the series.
*
* @param key the series key (null
not permitted).
* @param autoSort a flag that controls whether or not the items in the
* series are sorted.
* @param allowDuplicateXValues a flag that controls whether duplicate
* x-values are allowed.
*/
public XIntervalSeries(Comparable key, boolean autoSort,
boolean allowDuplicateXValues) {
super(key, autoSort, allowDuplicateXValues);
}
/**
* Adds a data item to the series.
*
* @param x the x-value.
* @param y the y-value.
* @param xLow the lower bound of the y-interval.
* @param xHigh the upper bound of the y-interval.
*/
public void add(double x, double xLow, double xHigh, double y) {
super.add(new XIntervalDataItem(x, xLow, xHigh, y), true);
}
/**
* Returns the x-value for the specified item.
*
* @param index the item index.
*
* @return The x-value (never null
).
*/
public Number getX(int index) {
XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);
return item.getX();
}
/**
* Returns the lower bound of the x-interval for the specified item.
*
* @param index the item index.
*
* @return The lower bound of the x-interval.
*
* @since 1.0.10
*/
public double getXLowValue(int index) {
XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);
return item.getXLowValue();
}
/**
* Returns the upper bound of the x-interval for the specified item.
*
* @param index the item index.
*
* @return The upper bound of the x-interval.
*
* @since 1.0.10
*/
public double getXHighValue(int index) {
XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);
return item.getXHighValue();
}
/**
* Returns the y-value for the specified item.
*
* @param index the item index.
*
* @return The y-value.
*/
public double getYValue(int index) {
XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);
return item.getYValue();
}
/**
* Returns the data item at the specified index.
*
* @param index the item index.
*
* @return The data item.
*/
public ComparableObjectItem getDataItem(int index) {
return super.getDataItem(index);
null
not permitted).
*/
public YIntervalSeries(Comparable key) {
this(key, true, true);
}
/**
* Constructs a new xy-series that contains no data. You can specify
* whether or not duplicate x-values are allowed for the series.
*
* @param key the series key (null
not permitted).
* @param autoSort a flag that controls whether or not the items in the
* series are sorted.
* @param allowDuplicateXValues a flag that controls whether duplicate
* x-values are allowed.
*/
public YIntervalSeries(Comparable key, boolean autoSort,
boolean allowDuplicateXValues) {
super(key, autoSort, allowDuplicateXValues);
}
/**
* Adds a data item to the series.
*
* @param x the x-value.
* @param y the y-value.
* @param yLow the lower bound of the y-interval.
* @param yHigh the upper bound of the y-interval.
*/
public void add(double x, double y, double yLow, double yHigh) {
super.add(new YIntervalDataItem(x, y, yLow, yHigh), true);
}
/**
* Returns the x-value for the specified item.
*
* @param index the item index.
*
* @return The x-value (never null
).
*/
public Number getX(int index) {
YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);
return item.getX();
}
/**
* Returns the y-value for the specified item.
*
* @param index the item index.
*
* @return The y-value.
*/
public double getYValue(int index) {
YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);
return item.getYValue();
}
/**
* Returns the lower bound of the Y-interval for the specified item in the
* series.
*
* @param index the item index.
*
* @return The lower bound of the Y-interval.
*
* @since 1.0.5
*/
public double getYLowValue(int index) {
YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);
return item.getYLowValue();
}
/**
* Returns the upper bound of the y-interval for the specified item in the
* series.
*
* @param index the item index.
*
* @return The upper bound of the y-interval.
*
* @since 1.0.5
*/
public double getYHighValue(int index) {
YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);
return item.getYHighValue();
}
/**
* Returns the data item at the specified index.
*
* @param index the item index.
*
* @return The data item.
*/
public ComparableObjectItem getDataItem(int index) {
return super.getDataItem(index);
File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XIntervalSeries.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/YIntervalSeries.java | |||
Method name:
|
Method name:
|
|||
Number of AST nodes: 0 | Number of AST nodes: 0 | |||
1 | public class XIntervalSeries extends ComparableObjectSeries {↵ | 1 | public class YIntervalSeries extends ComparableObjectSeries {↵ | |
2 | ↵ | |||
2 | /**↵ | 3 | /**↵ | |
3 | * Creates a new empty series. By default, items added to the series will↵ | 4 | * Creates a new empty series. By default, items added to the series will ↵ | |
4 | * be sorted into ascending order by x-value, and duplicate x-values will↵ | 5 | * be sorted into ascending order by x-value, and duplicate x-values will ↵ | |
5 | * be allowed (these defaults can be modified with another constructor.↵ | 6 | * be allowed (these defaults can be modified with another constructor.↵ | |
6 | *↵ | 7 | *↵ | |
7 | * @param key the series key ( | 8 | * @param key the series key ( | |
8 | */↵ | 9 | */↵ | |
9 | public XIntervalSeries(Comparable key) {↵ | 10 | public YIntervalSeries(Comparable key) {↵ | |
10 | this(key, true, true);↵ | 11 | this(key, true, true);↵ | |
11 | }↵ | 12 | }↵ | |
13 | ↵ | |||
12 | /**↵ | 14 | /**↵ | |
13 | * Constructs a new xy-series that contains no data. You can specify↵ | 15 | * Constructs a new xy-series that contains no data. You can specify ↵ | |
14 | * whether or not duplicate x-values are allowed for the series.↵ | 16 | * whether or not duplicate x-values are allowed for the series.↵ | |
15 | *↵ | 17 | *↵ | |
16 | * @param key the series key ( | 18 | * @param key the series key ( | |
17 | * @param autoSort a flag that controls whether or not the items in the↵ | 19 | * @param autoSort a flag that controls whether or not the items in the ↵ | |
18 | * series are sorted.↵ | 20 | * series are sorted.↵ | |
19 | * @param allowDuplicateXValues a flag that controls whether duplicate↵ | 21 | * @param allowDuplicateXValues a flag that controls whether duplicate ↵ | |
20 | * x-values are allowed.↵ | 22 | * x-values are allowed.↵ | |
21 | */↵ | 23 | */↵ | |
22 | public XIntervalSeries(Comparable key, boolean autoSort,↵ | 24 | public YIntervalSeries(Comparable key, boolean autoSort, ↵ | |
23 | boolean allowDuplicateXValues) {↵ | 25 | boolean allowDuplicateXValues) {↵ | |
24 | super(key, autoSort, allowDuplicateXValues);↵ | 26 | super(key, autoSort, allowDuplicateXValues);↵ | |
25 | }↵ | 27 | }↵ | |
28 | ↵ | |||
26 | /**↵ | 29 | /**↵ | |
27 | * Adds a data item to the series.↵ | 30 | * Adds a data item to the series.↵ | |
28 | *↵ | 31 | *↵ | |
29 | * @param x the x-value.↵ | 32 | * @param x the x-value.↵ | |
30 | * @param y the y-value.↵ | 33 | * @param y the y-value.↵ | |
31 | * @param xLow the lower bound of the y-interval.↵ | 34 | * @param yLow the lower bound of the y-interval.↵ | |
32 | * @param xHigh the upper bound of the y-interval.↵ | 35 | * @param yHigh the upper bound of the y-interval.↵ | |
33 | */↵ | 36 | */↵ | |
34 | public void add(double x, double xLow, double xHigh, double y) {↵ | 37 | public void add(double x, double y, double yLow, double yHigh) {↵ | |
35 | super.add(new XIntervalDataItem(x, xLow, xHigh, y), true);↵ | 38 | super.add(new YIntervalDataItem(x, y, yLow, yHigh), true);↵ | |
36 | }↵ | 39 | }↵ | |
40 | ↵ | |||
37 | /**↵ | 41 | /**↵ | |
38 | * Returns the x-value for the specified item.↵ | 42 | * Returns the x-value for the specified item.↵ | |
39 | *↵ | 43 | *↵ | |
40 | * @param index the item index.↵ | 44 | * @param index the item index.↵ | |
41 | *↵ | 45 | *↵ | |
42 | * @return The x-value (never | 46 | * @return The x-value (never | |
43 | */↵ | 47 | */↵ | |
44 | public Number getX(int index) {↵ | 48 | public Number getX(int index) {↵ | |
45 | XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);↵ | 49 | YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);↵ | |
46 | return item.getX();↵ | 50 | return item.getX();↵ | |
47 | }↵ | 51 | }↵ | |
52 | ↵ | |||
48 | /**↵ | 53 | /**↵ | |
49 | * Returns the lower bound of the x-interval for the specified item.↵ | 54 | * Returns the y-value for the specified item.↵ | |
50 | *↵ | 55 | *↵ | |
51 | * @param index the item index.↵ | 56 | * @param index the item index.↵ | |
52 | *↵ | 57 | *↵ | |
53 | * @return The lower bound of the x-interval.↵ | 58 | * @return The ↵ | |
54 | *↵ | |||
55 | * @since 1.0.10↵ | 59 | y-value.↵ | |
56 | */↵ | 60 | */↵ | |
57 | public double getXLowValue(int index) {↵ | 61 | public double getYValue(int index) {↵ | |
58 | XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);↵ | 62 | YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);↵ | |
59 | return item.getXLowValue();↵ | 63 | return item.getYValue();↵ | |
60 | }↵ | 64 | }↵ | |
65 | ↵ | |||
61 | /**↵ | 66 | /**↵ | |
62 | * Returns the upper bound of the x-interval for the specified item↵ | 67 | * Returns the lower bound of the Y-interval for the specified item in the↵ | |
63 | .↵ | 68 | * series.↵ | |
64 | *↵ | 69 | * ↵ | |
65 | * @param index the item index.↵ | 70 | * @param index the item index.↵ | |
66 | *↵ | 71 | * ↵ | |
67 | * @return The upper bound of the x-interval.↵ | 72 | * @return The lower bound of the Y-interval.↵ | |
68 | *↵ | 73 | * ↵ | |
69 | * @since 1.0.10↵ | 74 | * @since 1.0.5↵ | |
70 | */↵ | 75 | */↵ | |
71 | public double getXHighValue(int index) {↵ | 76 | public double getYLowValue(int index) {↵ | |
72 | XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);↵ | 77 | YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);↵ | |
73 | return item.getXHighValue();↵ | 78 | return item.getYLowValue();↵ | |
74 | }↵ | 79 | }↵ | |
80 | ↵ | |||
75 | /**↵ | 81 | /**↵ | |
76 | * Returns the y-value for the specified item↵ | 82 | * Returns the upper bound of the y-interval for the specified item in the↵ | |
77 | .↵ | 83 | * series.↵ | |
78 | *↵ | 84 | * ↵ | |
79 | * @param index the item index.↵ | 85 | * @param index the item index.↵ | |
80 | *↵ | 86 | * ↵ | |
81 | * @return The y-value.↵ | 87 | * @return The upper bound of the y-interval.↵ | |
88 | * ↵ | |||
89 | * @since 1.0.5↵ | |||
82 | */↵ | 90 | */↵ | |
83 | public double getYValue(int index) {↵ | 91 | public double getYHighValue(int index) {↵ | |
84 | XIntervalDataItem item = (XIntervalDataItem) getDataItem(index);↵ | 92 | YIntervalDataItem item = (YIntervalDataItem) getDataItem(index);↵ | |
85 | return item.getYValue();↵ | 93 | return item.getYHighValue();↵ | |
86 | }↵ | 94 | }↵ | |
87 | /**↵ | 95 | /**↵ | |
88 | * Returns the data item at the specified index.↵ | 96 | * Returns the data item at the specified index.↵ | |
89 | *↵ | 97 | * ↵ | |
90 | * @param index the item index.↵ | 98 | * @param index the item index.↵ | |
91 | *↵ | 99 | * ↵ | |
92 | * @return The data item.↵ | 100 | * @return The data item.↵ | |
93 | */↵ | 101 | */↵ | |
94 | public ComparableObjectItem getDataItem(int index) {↵ | 102 | public ComparableObjectItem getDataItem(int index) {↵ | |
95 | return super.getDataItem(index);↵ | 103 | return super.getDataItem(index);↵ | |
96 | | 104 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |