-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNumericalData.java
More file actions
46 lines (34 loc) · 886 Bytes
/
NumericalData.java
File metadata and controls
46 lines (34 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.example.sudarshanseshadri.bloombergjson;
import java.util.ArrayList;
public class NumericalData {
String key;
ArrayList<Double> data;
public NumericalData(String key, ArrayList<Double> data) {
this.key = key;
this.data = data;
}
public NumericalData(String key) {
this.key = key;
data = new ArrayList<>();
}
public NumericalData(String key, double data) {
this.key = key;
this.data = new ArrayList<>();
this.data.add(data);
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public ArrayList<Double> getData() {
return data;
}
public void setData(ArrayList<Double> data) {
this.data = data;
}
public void addData(double data) {
this.data.add(data);
}
}