IntegerList implements SortedSet<Integer>, List<Integer> { protected int getLastValueOnSegment(int idxSegment) { assert idxSegment % 2 == 0; if (this.values == null) { throw new IndexOutOfBoundsException(); } return this.values[idxSegment + 1]; } IntegerList();  IntegerList(int value);  IntegerList(int start, int end);  IntegerList(Collection<? extends Integer> collection); @Pure @Override String toString(); @Pure @Inline(value = "null", constantExpression = true) @Override Comparator<? super Integer> comparator(); @Pure @Override Integer first(); @Pure @Override SortedSet<Integer> headSet(Integer toElement); @Pure @Override Integer last(); @Pure @Override SortedSet<Integer> subSet(Integer fromElement, Integer toElement); @Pure @Override SortedSet<Integer> tailSet(Integer fromElement); @Override final void add(int index, Integer element); @Override boolean add(Integer value); @Override final boolean addAll(int index, Collection<? extends Integer> collection); @Override boolean addAll(Collection<? extends Integer> collection); @Override void clear(); @Pure @Override boolean contains(Object obj); @Pure @Override boolean containsAll(Collection<?> collection); @Pure @Override boolean isEmpty(); @Pure @Override Iterator<Integer> iterator(); @Pure Iterator<IntegerSegment> segmentIterator(); @Pure Iterable<IntegerSegment> toSegmentIterable(); @Override boolean remove(Object obj); @Override Integer remove(int index); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override Integer set(int index, Integer element); void set(SortedSet<? extends Number> collection); @Pure @Override int size(); @Override @Pure Integer get(int index); @Override @Pure Object[] toArray(); @Override @SuppressWarnings("unchecked") T[] toArray(T[] array); @Pure int[] toIntArray(); @Pure SortedSet<Integer> toSortedSet(); @Pure @Override int indexOf(Object obj); @Pure @Override int lastIndexOf(Object obj); @Pure @Override ListIterator<Integer> listIterator(); @Pure @Override ListIterator<Integer> listIterator(int index); @Pure @Override List<Integer> subList(int fromIndex, int toIndex); @Pure @Override Spliterator<Integer> spliterator();  }
@Test public void getLastValueOnSegmentInt() { assertEquals(3, this.list.getLastValueOnSegment(0)); assertEquals(10, this.list.getLastValueOnSegment(2)); assertEquals(25, this.list.getLastValueOnSegment(4)); }