LongArraySeries extends LongBaseSeries { @Override public long getLong(int index) { if (index >= size) { throw new ArrayIndexOutOfBoundsException(index); } return data[offset + index]; } LongArraySeries(long... data);  LongArraySeries(long[] data, int offset, int size); @Override int size(); @Override long getLong(int index); @Override void copyToLong(long[] to, int fromOffset, int toOffset, int len); @Override LongSeries headLong(int len); @Override LongSeries tailLong(int len); @Override LongSeries rangeOpenClosedLong(int fromInclusive, int toExclusive); @Override LongSeries materializeLong(); @Override long max(); @Override long min(); @Override long sum(); @Override double average(); @Override double median();  }
@Test public void testGetLong() { LongArraySeries s = new LongArraySeries(1, 2); assertEquals(1, s.getLong(0)); assertEquals(2, s.getLong(1)); }
@Test public void testGetLong_Offset() { LongArraySeries s = new LongArraySeries(new long[]{1, 2, 3, 4}, 1, 2); assertEquals(2, s.getLong(0)); assertEquals(3, s.getLong(1)); }
@Test public void testGetLong_Offset_OutOfBounds() { LongArraySeries s = new LongArraySeries(new long[]{1, 2, 3, 4}, 1, 2); assertThrows(ArrayIndexOutOfBoundsException.class, () -> s.getLong(2)); }