com.scudata.cellset.graph.draw.ExtGraphCategory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.cellset.graph.draw;
import java.util.*;
import com.scudata.util.*;
/**
* ͼ?η??ඨ????չ????
*
* @author Joancy
*
*/
public class ExtGraphCategory implements Comparable{
/** ???????ʽ ???? ʱ??״̬ͼ???????ʽ?????ͼ????̱?ͼ????Ŀ*/
private Object name;
/**?˷????µ?ϵ?? (ExtGraphSery???? ExtGraphTimeStatus)*/
private ArrayList series;
/**
* ???????
* @return Object ????????
*/
public Object getName() {
return name;
}
/**
* ȡ???????Ƶ??ַ?????ʾ??
* @return ?ַ???????
*/
public String getNameString(){
return Variant.toString(name);
}
/**
* ???ܵ?ǰ?????µ?ϵ????ֵ
* @return ????ֵ
*/
public double getSumSeries() {
double d = 0;
for (int i = 0; i < series.size(); i++) {
ExtGraphSery egs = (ExtGraphSery) series.get(i);
d += egs.getValue();
}
return d;
}
/**
* ???÷????????д???0????ֵ??????
* ?ѻ?ͼ???õ?
* @return double ????????ֵ
*/
public double getPositiveSumSeries() {
double d = 0;
for (int i = 0; i < series.size(); i++) {
ExtGraphSery egs = (ExtGraphSery) series.get(i);
double v = egs.getValue();
if( v<=0 ){
continue;
}
d += egs.getValue();
}
return d;
}
/**
* ͳ??ϵ??ֵΪ???Ļ???ֵ
* @return ????????ֵ
*/
public double getNegativeSumSeries() {
double d = 0;
for (int i = 0; i < series.size(); i++) {
ExtGraphSery egs = (ExtGraphSery) series.get(i);
double v = egs.getValue();
if( v>=0 ){
continue;
}
d += egs.getValue();
}
return d;
}
/**
* ȡϵ?ж???
* @param seriesName ϵ??????
* @return ϵ?ж???
*/
public ExtGraphSery getExtGraphSery( Object seriesName ){
ExtGraphSery egs;
for( int i=0; i
© 2015 - 2024 Weber Informatics LLC | Privacy Policy