YInterval
.
*
* @param y the y-value.
* @param yLow the lower bound of the y-interval.
* @param yHigh the upper bound of the y-interval.
*/
public YInterval(double y, double yLow, double yHigh) {
this.y = y;
this.yLow = yLow;
this.yHigh = yHigh;
}
/**
* Returns the y-value.
*
* @return The y-value.
*/
public double getY() {
return this.y;
}
/**
* Returns the lower bound of the y-interval.
*
* @return The lower bound of the y-interval.
*/
public double getYLow() {
return this.yLow;
}
/**
* Returns the upper bound of the y-interval.
*
* @return The upper bound of the y-interval.
*/
public double getYHigh() {
return this.yHigh;
}
/**
* Tests this instance for equality with an arbitrary object.
*
* @param obj the object (null
permitted).
*
* @return A boolean.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof YInterval)) {
return false;
}
YInterval that = (YInterval) obj;
if (this.y != that.y) {
return false;
}
if (this.yLow != that.yLow) {
return false;
}
if (this.yHigh != that.yHigh) {
return false;
}
return true;
YWithXInterval
.
*
* @param y the y-value.
* @param xLow the lower bound of the x-interval.
* @param xHigh the upper bound of the x-interval.
*/
public YWithXInterval(double y, double xLow, double xHigh) {
this.y = y;
this.xLow = xLow;
this.xHigh = xHigh;
}
/**
* Returns the y-value.
*
* @return The y-value.
*/
public double getY() {
return this.y;
}
/**
* Returns the lower bound of the x-interval.
*
* @return The lower bound of the x-interval.
*/
public double getXLow() {
return this.xLow;
}
/**
* Returns the upper bound of the x-interval.
*
* @return The upper bound of the x-interval.
*/
public double getXHigh() {
return this.xHigh;
}
/**
* Tests this instance for equality with an arbitrary object.
*
* @param obj the object (null
permitted).
*
* @return A boolean.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof YWithXInterval)) {
return false;
}
YWithXInterval that = (YWithXInterval) obj;
if (this.y != that.y) {
return false;
}
if (this.xLow != that.xLow) {
return false;
}
if (this.xHigh != that.xHigh) {
return false;
}
return true;
File path: /jfreechart-1.0.10/src/org/jfree/data/xy/YInterval.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/YWithXInterval.java | |||
Method name:
|
Method name:
|
|||
Number of AST nodes: 0 | Number of AST nodes: 0 | |||
1 | public class YInterval implements Serializable {↵ | 1 | public class YWithXInterval implements Serializable {↵ | |
2 | ↵ | 2 | ↵ | |
3 | /** The y-value. */↵ | 3 | /** The y-value. */↵ | |
4 | private double y;↵ | 4 | private double y;↵ | |
5 | ↵ | 5 | ↵ | |
6 | /** The lower bound of the y-interval. */↵ | 6 | /** The lower bound of the x-interval. */↵ | |
7 | private double yLow;↵ | 7 | private double xLow;↵ | |
8 | ↵ | 8 | ↵ | |
9 | /** The upper bound of the y-interval. */↵ | 9 | /** The upper bound of the x-interval. */↵ | |
10 | private double yHigh;↵ | 10 | private double xHigh;↵ | |
11 | ↵ | 11 | ↵ | |
12 | /** ↵ | 12 | /** ↵ | |
13 | * Creates a new instance of | 13 | * Creates a new instance of | |
14 | *↵ | 14 | *↵ | |
15 | * @param y the y-value.↵ | 15 | * @param y the y-value.↵ | |
16 | * @param yLow the lower bound of the y-interval.↵ | 16 | * @param xLow the lower bound of the x-interval.↵ | |
17 | * @param yHigh the upper bound of the y-interval. ↵ | 17 | * @param xHigh the upper bound of the x-interval. ↵ | |
18 | */↵ | 18 | */↵ | |
19 | public YInterval(double y, double yLow, double yHigh) {↵ | 19 | public YWithXInterval(double y, double xLow, double xHigh) {↵ | |
20 | this.y = y;↵ | 20 | this.y = y;↵ | |
21 | this.yLow = yLow;↵ | 21 | this.xLow = xLow;↵ | |
22 | this.yHigh = yHigh;↵ | 22 | this.xHigh = xHigh;↵ | |
23 | }↵ | 23 | }↵ | |
24 | ↵ | 24 | ↵ | |
25 | /**↵ | 25 | /**↵ | |
26 | * Returns the y-value.↵ | 26 | * Returns the y-value.↵ | |
27 | *↵ | 27 | *↵ | |
28 | * @return The y-value.↵ | 28 | * @return The y-value.↵ | |
29 | */↵ | 29 | */↵ | |
30 | public double getY() {↵ | 30 | public double getY() {↵ | |
31 | return this.y;↵ | 31 | return this.y;↵ | |
32 | }↵ | 32 | }↵ | |
33 | ↵ | 33 | ↵ | |
34 | /**↵ | 34 | /**↵ | |
35 | * Returns the lower bound of the y-interval.↵ | 35 | * Returns the lower bound of the x-interval.↵ | |
36 | *↵ | 36 | *↵ | |
37 | * @return The lower bound of the y-interval.↵ | 37 | * @return The lower bound of the x-interval.↵ | |
38 | */↵ | 38 | */↵ | |
39 | public double getYLow() {↵ | 39 | public double getXLow() {↵ | |
40 | return this.yLow;↵ | 40 | return this.xLow;↵ | |
41 | }↵ | 41 | }↵ | |
42 | ↵ | 42 | ↵ | |
43 | /**↵ | 43 | /**↵ | |
44 | * Returns the upper bound of the y-interval.↵ | 44 | * Returns the upper bound of the x-interval.↵ | |
45 | *↵ | 45 | *↵ | |
46 | * @return The upper bound of the y-interval.↵ | 46 | * @return The upper bound of the x-interval.↵ | |
47 | */↵ | 47 | */↵ | |
48 | public double getYHigh() {↵ | 48 | public double getXHigh() {↵ | |
49 | return this.yHigh;↵ | 49 | return this.xHigh;↵ | |
50 | }↵ | 50 | }↵ | |
51 | ↵ | 51 | ↵ | |
52 | /**↵ | 52 | /**↵ | |
53 | * Tests this instance for equality with an arbitrary object.↵ | 53 | * Tests this instance for equality with an arbitrary object.↵ | |
54 | *↵ | 54 | *↵ | |
55 | * @param obj the object ( | 55 | * @param obj the object ( | |
56 | *↵ | 56 | *↵ | |
57 | * @return A boolean.↵ | 57 | * @return A boolean.↵ | |
58 | */↵ | 58 | */↵ | |
59 | public boolean equals(Object obj) {↵ | 59 | public boolean equals(Object obj) {↵ | |
60 | if (obj == this) {↵ | 60 | if (obj == this) {↵ | |
61 | return true;↵ | 61 | return true;↵ | |
62 | }↵ | 62 | }↵ | |
63 | if (!(obj instanceof YInterval)) {↵ | 63 | if (!(obj instanceof YWithXInterval)) {↵ | |
64 | return false;↵ | 64 | return false;↵ | |
65 | }↵ | 65 | }↵ | |
66 | YInterval that = (YInterval) obj;↵ | 66 | YWithXInterval that = (YWithXInterval) obj;↵ | |
67 | if (this.y != that.y) {↵ | 67 | if (this.y != that.y) {↵ | |
68 | return false;↵ | 68 | return false;↵ | |
69 | }↵ | 69 | }↵ | |
70 | if (this.yLow != that.yLow) {↵ | 70 | if (this.xLow != that.xLow) {↵ | |
71 | return false;↵ | 71 | return false;↵ | |
72 | }↵ | 72 | }↵ | |
73 | if (this.yHigh != that.yHigh) {↵ | 73 | if (this.xHigh != that.xHigh) {↵ | |
74 | return false;↵ | 74 | return false;↵ | |
75 | }↵ | 75 | }↵ | |
76 | return true;↵ | 76 | return true;↵ | |
77 | | 77 |
| |
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 |