package net.sf.jasperreports.charts.util;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class XYZElement implements Serializable {
  private static final long serialVersionUID = 10200L;
  
  private Comparable series = null;
  
  private List xElements = null;
  
  private List yElements = null;
  
  private List zElements = null;
  
  public XYZElement() {
    this.xElements = new ArrayList();
    this.yElements = new ArrayList();
    this.zElements = new ArrayList();
  }
  
  public void setSeries(Comparable series) {
    this.series = series;
  }
  
  public Comparable getSeries() {
    return this.series;
  }
  
  public void addElement(Number xElement, Number yElement, Number zElement) {
    this.xElements.add(xElement);
    this.yElements.add(yElement);
    this.zElements.add(zElement);
  }
  
  public Number getXElement(int index) {
    return this.xElements.get(index);
  }
  
  public Number getYElement(int index) {
    return this.yElements.get(index);
  }
  
  public Number getZElement(int index) {
    return this.zElements.get(index);
  }
  
  public int getCount() {
    int retVal = 0;
    if (this.xElements != null)
      retVal = this.xElements.size(); 
    return retVal;
  }
}
