55
66import org .epics .util .array .ArrayInteger ;
77import org .epics .util .array .ListInteger ;
8+ import org .epics .util .array .ListNumber ;
89
910/**
10- * Immutable {@code VEnum } implementation.
11+ * Immutable {@code VEnumArray } implementation.
1112 *
1213 * @author carcassi, shroffk, kasemir
1314 */
1415public class IVEnumArray extends VEnumArray {
1516
1617 private final Alarm alarm ;
1718 private final Time time ;
18- private final ListInteger indices ;
19+ private final ListNumber indices ;
1920 private final EnumDisplay enumDisplay ;
2021
2122 private final List <String > labels ;
2223
23- IVEnumArray (ListInteger indices , EnumDisplay enumDisplay , Alarm alarm , Time time ) {
24+ IVEnumArray (ListNumber indices , EnumDisplay enumDisplay , Alarm alarm , Time time ) {
2425 VType .argumentNotNull ("enumDisplay" , enumDisplay );
2526 this .enumDisplay = enumDisplay ;
2627
@@ -32,8 +33,8 @@ public class IVEnumArray extends VEnumArray {
3233 for (int i = 0 ; i < indices .size (); i ++) {
3334 int index = indices .getInt (i );
3435 if (index < 0 || index >= enumDisplay .getChoices ().size ()) {
35- throw new IndexOutOfBoundsException ("VEnumArray element " + i + " has index " + index
36- + " outside of permitted options " + enumDisplay .getChoices ());
36+ labels . add ("VEnumArray element " + i + " has index " + index + " outside of permitted options "
37+ + enumDisplay .getChoices ());
3738 }
3839 labels .add (enumDisplay .getChoices ().get (index ));
3940 }
@@ -63,7 +64,7 @@ public List<String> getData() {
6364 }
6465
6566 @ Override
66- public ListInteger getIndexes () {
67+ public ListNumber getIndexes () {
6768 return indices ;
6869 }
6970
0 commit comments