IntArraySeries extends IntBaseSeries { @Override public int getInt(int index) { if (index >= size) { throw new ArrayIndexOutOfBoundsException(index); } return data[offset + index]; } IntArraySeries(int... data);  IntArraySeries(int[] data, int offset, int size); @Override int size(); @Override int getInt(int index); @Override void copyToInt(int[] to, int fromOffset, int toOffset, int len); @Override IntSeries headInt(int len); @Override IntSeries tailInt(int len); @Override IntSeries rangeOpenClosedInt(int fromInclusive, int toExclusive); @Override IntSeries materializeInt(); @Override int max(); @Override int min(); @Override long sum(); @Override double average(); @Override double median();  }
@Test public void testGetInt() { IntArraySeries s = new IntArraySeries(1, 2); assertEquals(1, s.getInt(0)); assertEquals(2, s.getInt(1)); }
@Test public void testGetInt_Offset() { IntArraySeries s = new IntArraySeries(new int[]{1, 2, 3, 4}, 1, 2); assertEquals(2, s.getInt(0)); assertEquals(3, s.getInt(1)); }
@Test public void testGetInt_Offset_OutOfBounds() { IntArraySeries s = new IntArraySeries(new int[]{1, 2, 3, 4}, 1, 2); assertThrows(ArrayIndexOutOfBoundsException.class, () -> s.getInt(2)); }