com.datastax.data.exploration.dto.dataChart.stackedBar.StackedBarChartValue Maven / Gradle / Ivy
package com.datastax.data.exploration.dto.dataChart.stackedBar;
import java.util.ArrayList;
import java.util.List;
/**
* 交叉分组表 数据展示传输类
* @author songfu 2018/1/3
*/
public class StackedBarChartValue {
private String group;
private List bar;
public StackedBarChartValue(String group) {
this.group = group;
this.bar = new ArrayList<>();
}
public void put(String stack, double value) {
this.bar.add(new Bar(stack, value));
}
private class Bar{
private String stack;
private double value;
public Bar(String stack, double value) {
this.stack = stack;
this.value = value;
}
public String getStack() {
return stack;
}
public double getValue() {
return value;
}
@Override
public String toString() {
return "Bar{" +
"stack='" + stack + '\'' +
", value=" + value +
'}';
}
}
public String getGroup() {
return group;
}
public List getBar() {
return bar;
}
@Override
public String toString() {
return "StackedBarChartValue{" +
"group='" + group + '\'' +
", bar=" + bar.toString() +
'}';
}
}