1 28 package net.sf.jasperreports.charts.util; 29 30 import java.io.Serializable ; 31 import java.util.ArrayList ; 32 import java.util.List ; 33 34 import net.sf.jasperreports.engine.JRConstants; 35 36 37 41 public class XYZElement implements Serializable { 42 43 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 44 45 private Comparable series = null; 46 private List xElements = null; 47 private List yElements = null; 48 private List zElements = null; 49 50 public XYZElement(){ 51 xElements = new ArrayList (); 52 yElements = new ArrayList (); 53 zElements = new ArrayList (); 54 } 55 56 public void setSeries( Comparable series ){ 57 this.series = series; 58 } 59 60 public Comparable getSeries(){ 61 return series; 62 } 63 64 public void addElement( Number xElement, Number yElement, Number zElement ){ 65 xElements.add( xElement ); 66 yElements.add( yElement ); 67 zElements.add( zElement ); 68 69 } 70 71 72 public Number getXElement( int index ){ 73 return (Number )xElements.get( index ); 74 } 75 76 public Number getYElement( int index ){ 77 return (Number )yElements.get( index ); 78 } 79 80 public Number getZElement( int index ){ 81 return (Number )zElements.get( index ); 82 } 83 84 85 public int getCount(){ 86 int retVal = 0; 87 if( xElements != null ){ 88 retVal = xElements.size(); 89 } 90 91 return retVal; 92 } 93 94 } 95 | Popular Tags |