Skip to content

Commit 9f7c3c4

Browse files
committed
#15 initial implementation of the VImage
1 parent c278237 commit 9f7c3c4

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
package org.epics.vtype;
2+
3+
import org.epics.util.array.ListNumber;
4+
5+
/**
6+
* An immutable implementation of the {@link VImage}
7+
*
8+
* @author Kunal Shroff
9+
*
10+
*/
11+
public class IVImage extends VImage {
12+
13+
private final Alarm alarm;
14+
private final Time time;
15+
16+
private final int height;
17+
private final int width;
18+
private final ListNumber data;
19+
private final VImageDataType imageDataType;
20+
private final VImageType imageType;
21+
22+
IVImage(int height, int width, ListNumber data, VImageDataType imageDataType, VImageType imageType, Alarm alarm,
23+
Time time) {
24+
super();
25+
VType.argumentNotNull("alarm", alarm);
26+
VType.argumentNotNull("time", time);
27+
this.alarm = alarm;
28+
this.time = time;
29+
this.height = height;
30+
this.width = width;
31+
this.data = data;
32+
this.imageDataType = imageDataType;
33+
this.imageType = imageType;
34+
}
35+
36+
public int getHeight() {
37+
return height;
38+
}
39+
40+
public int getWidth() {
41+
return width;
42+
}
43+
44+
public ListNumber getData() {
45+
return data;
46+
}
47+
48+
@Override
49+
public Alarm getAlarm() {
50+
return alarm;
51+
}
52+
53+
@Override
54+
public Time getTime() {
55+
return time;
56+
}
57+
58+
@Override
59+
public VImageDataType getDataType() {
60+
return imageDataType;
61+
}
62+
63+
@Override
64+
public VImageType getVImageType() {
65+
return imageType;
66+
}
67+
68+
}

0 commit comments

Comments
 (0)