package com.moon.server.entity.data; import com.moon.server.helper.WebHelper; import java.io.Serializable; import java.util.ArrayList; import java.util.List; @SuppressWarnings("ALL") public class AnalysisResultEntity implements Serializable { private static final long serialVersionUID = -1237623414044281355L; public AnalysisResultEntity() { this.code = 200; this.minList = new ArrayList<>(); this.avgList = new ArrayList<>(); this.maxList = new ArrayList<>(); this.points = new ArrayList<>(); } public AnalysisResultEntity(String token) { this(); this.token = token; } /** * 添加点 */ public void addPoint(double x, double y, double len, List vals) { Point point = new Point(x, y, len, vals); this.points.add(point); } /** * 添加Band值 */ public void addBandVals(double min, double avg, double max) { this.minList.add(WebHelper.round(min, 3)); this.avgList.add(WebHelper.round(avg, 3)); this.maxList.add(WebHelper.round(max, 3)); } private String token; private String layerName; private List minList; private List avgList; private List maxList; private int code; private String info; private String unit; private List points; public String getToken() { return token; } public void setToken(String token) { this.token = token; } public String getLayerName() { return layerName; } public void setLayerName(String layerName) { this.layerName = layerName; } public List getMinList() { return minList; } public void setMinList(List minList) { this.minList = minList; } public List getAvgList() { return avgList; } public void setAvgList(List avgList) { this.avgList = avgList; } public List getMaxList() { return maxList; } public void setMaxList(List maxList) { this.maxList = maxList; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getInfo() { return info; } public void setInfo(String info) { this.info = info; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } public List getPoints() { return points; } public void setPoints(List points) { this.points = points; } public static class Point { private double x; private double y; private double len; private List vals; public Point() { } public Point(double x, double y, double len, List vals) { this.x = x; this.y = y; this.len = WebHelper.round(len, 3); this.vals = vals; } public double getX() { return x; } public void setX(double x) { this.x = x; } public double getY() { return y; } public void setY(double y) { this.y = y; } public double getLen() { return len; } public void setLen(double len) { this.len = len; } public List getVals() { return vals; } public void setVals(List vals) { this.vals = vals; } } }