1 42 43 package org.jfree.data.xy; 44 45 import org.jfree.data.ComparableObjectItem; 46 47 52 public class YIntervalDataItem extends ComparableObjectItem { 53 54 62 public YIntervalDataItem(double x, double y, double yLow, double yHigh) { 63 super(new Double (x), new YInterval(y, yLow, yHigh)); 64 } 65 66 71 public Double getX() { 72 return (Double ) getComparable(); 73 } 74 75 80 public double getYValue() { 81 YInterval interval = (YInterval) getObject(); 82 if (interval != null) { 83 return interval.getY(); 84 } 85 else { 86 return Double.NaN; 87 } 88 } 89 90 95 public double getYLowValue() { 96 YInterval interval = (YInterval) getObject(); 97 if (interval != null) { 98 return interval.getYLow(); 99 } 100 else { 101 return Double.NaN; 102 } 103 } 104 105 110 public double getYHighValue() { 111 YInterval interval = (YInterval) getObject(); 112 if (interval != null) { 113 return interval.getYHigh(); 114 } 115 else { 116 return Double.NaN; 117 } 118 } 119 120 } 121 | Popular Tags |