XIntervalDataItem
.
*
* @param x the x-value.
* @param xLow the lower bound of the x-interval.
* @param xHigh the upper bound of the x-interval.
* @param y the y-value.
*/
public XIntervalDataItem(double x, double xLow, double xHigh, double y) {
super(new Double(x), new YWithXInterval(y, xLow, xHigh));
}
/**
* Returns the x-value.
*
* @return The x-value (never null
).
*/
public Number getX() {
return (Number) getComparable();
}
/**
* Returns the y-value.
*
* @return The y-value.
*/
public double getYValue() {
YWithXInterval interval = (YWithXInterval) getObject();
if (interval != null) {
return interval.getY();
}
else {
return Double.NaN;
}
}
/**
* Returns the lower bound of the x-interval.
*
* @return The lower bound of the x-interval.
*/
public double getXLowValue() {
YWithXInterval interval = (YWithXInterval) getObject();
if (interval != null) {
return interval.getXLow();
}
else {
return Double.NaN;
}
}
/**
* Returns the upper bound of the x-interval.
*
* @return The upper bound of the x-interval.
*/
public double getXHighValue() {
YWithXInterval interval = (YWithXInterval) getObject();
if (interval != null) {
return interval.getXHigh();
}
else {
return Double.NaN;
YIntervalItem
.
*
* @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 YIntervalDataItem(double x, double y, double yLow, double yHigh) {
super(new Double(x), new YInterval(y, yLow, yHigh));
}
/**
* Returns the x-value.
*
* @return The x-value (never null
).
*/
public Double getX() {
return (Double) getComparable();
}
/**
* Returns the y-value.
*
* @return The y-value.
*/
public double getYValue() {
YInterval interval = (YInterval) getObject();
if (interval != null) {
return interval.getY();
}
else {
return Double.NaN;
}
}
/**
* Returns the lower bound of the y-interval.
*
* @return The lower bound of the y-interval.
*/
public double getYLowValue() {
YInterval interval = (YInterval) getObject();
if (interval != null) {
return interval.getYLow();
}
else {
return Double.NaN;
}
}
/**
* Returns the upper bound of the y-interval.
*
* @return The upper bound of the y-interval.
*/
public double getYHighValue() {
YInterval interval = (YInterval) getObject();
if (interval != null) {
return interval.getYHigh();
}
else {
return Double.NaN;
File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XIntervalDataItem.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/YIntervalDataItem.java | |||
Method name:
|
Method name:
|
|||
Number of AST nodes: 0 | Number of AST nodes: 0 | |||
1 | public class XIntervalDataItem extends ComparableObjectItem {↵ | 1 | public class YIntervalDataItem extends ComparableObjectItem {↵ | |
2 | /** ↵ | 2 | /** ↵ | |
3 | * Creates a new instance of | 3 | * Creates a new instance of | |
4 | *↵ | 4 | *↵ | |
5 | * @param x the x-value.↵ | 5 | * @param x the x-value.↵ | |
6 | * @param x↵ | 6 | * @param y the y-value.↵ | |
7 | Low the lower bound of the x-interval.↵ | 7 | * @param yLow the lower bound of the y-interval.↵ | |
8 | * @param xHigh the upper bound of the x-interval.↵ | 8 | * @param yHigh the upper bound of the y-interval.↵ | |
9 | * @param y the y-value.↵ | |||
10 | */↵ | 9 | */↵ | |
11 | public XIntervalDataItem(double x, double xLow, double xHigh, double y) {↵ | 10 | public YIntervalDataItem(double x, double y, double yLow, double yHigh) {↵ | |
12 | super(new Double(x), new YWithXInterval(y, xLow, xHigh));↵ | 11 | super(new Double(x), new YInterval(y, yLow, yHigh));↵ | |
13 | }↵ | 12 | }↵ | |
14 | ↵ | 13 | ↵ | |
15 | /**↵ | 14 | /**↵ | |
16 | * Returns the x-value.↵ | 15 | * Returns the x-value.↵ | |
17 | *↵ | 16 | *↵ | |
18 | * @return The x-value (never | 17 | * @return The x-value (never | |
19 | */↵ | 18 | */↵ | |
20 | public Number getX() {↵ | 19 | public Double getX() {↵ | |
21 | return (Number) getComparable();↵ | 20 | return (Double) getComparable();↵ | |
22 | }↵ | 21 | }↵ | |
23 | ↵ | 22 | ↵ | |
24 | /**↵ | 23 | /**↵ | |
25 | * Returns the y-value.↵ | 24 | * Returns the y-value.↵ | |
26 | *↵ | 25 | *↵ | |
27 | * @return The y-value.↵ | 26 | * @return The y-value.↵ | |
28 | */↵ | 27 | */↵ | |
29 | public double getYValue() {↵ | 28 | public double getYValue() {↵ | |
30 | YWithXInterval interval = (YWithXInterval) getObject();↵ | 29 | YInterval interval = (YInterval) getObject();↵ | |
31 | if (interval != null) {↵ | 30 | if (interval != null) {↵ | |
32 | return interval.getY();↵ | 31 | return interval.getY();↵ | |
33 | }↵ | 32 | }↵ | |
34 | else {↵ | 33 | else {↵ | |
35 | return Double.NaN;↵ | 34 | return Double.NaN;↵ | |
36 | }↵ | 35 | }↵ | |
37 | }↵ | 36 | }↵ | |
38 | ↵ | 37 | ↵ | |
39 | /**↵ | 38 | /**↵ | |
40 | * Returns the lower bound of the x-interval.↵ | 39 | * Returns the lower bound of the y-interval.↵ | |
41 | *↵ | 40 | *↵ | |
42 | * @return The lower bound of the x-interval.↵ | 41 | * @return The lower bound of the y-interval.↵ | |
43 | */↵ | 42 | */↵ | |
44 | public double getXLowValue() {↵ | 43 | public double getYLowValue() {↵ | |
45 | YWithXInterval interval = (YWithXInterval) getObject();↵ | 44 | YInterval interval = (YInterval) getObject();↵ | |
46 | if (interval != null) {↵ | 45 | if (interval != null) {↵ | |
47 | return interval.getXLow();↵ | 46 | return interval.getYLow();↵ | |
48 | }↵ | 47 | }↵ | |
49 | else {↵ | 48 | else {↵ | |
50 | return Double.NaN;↵ | 49 | return Double.NaN;↵ | |
51 | }↵ | 50 | }↵ | |
52 | }↵ | 51 | }↵ | |
53 | ↵ | 52 | ↵ | |
54 | /**↵ | 53 | /**↵ | |
55 | * Returns the upper bound of the x-interval.↵ | 54 | * Returns the upper bound of the y-interval.↵ | |
56 | *↵ | 55 | *↵ | |
57 | * @return The upper bound of the x-interval.↵ | 56 | * @return The upper bound of the y-interval.↵ | |
58 | */↵ | 57 | */↵ | |
59 | public double getXHighValue() {↵ | 58 | public double getYHighValue() {↵ | |
60 | YWithXInterval interval = (YWithXInterval) getObject();↵ | 59 | YInterval interval = (YInterval) getObject();↵ | |
61 | if (interval != null) {↵ | 60 | if (interval != null) {↵ | |
62 | return interval.getXHigh();↵ | 61 | return interval.getYHigh();↵ | |
63 | }↵ | 62 | }↵ | |
64 | else {↵ | 63 | else {↵ | |
65 | return Double.NaN;↵ | 64 | return Double.NaN;↵ | |
66 | | 65 |
| |
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 |