class IntegerList implements SortedSet<Integer>, List<Integer> {

	@Override
	@Pure
	public Integer get(int index) {
		if (this.values == null) {
			throw new IndexOutOfBoundsException(Integer.toString(index));
		}

		int firstIndex = 0;

		for (int idxStart = 0; idxStart < this.values.length - 1; idxStart += 2) {
			final int endIndex = this.values[idxStart + 1] - this.values[idxStart] + firstIndex;
			if ((index >= firstIndex) && (index <= endIndex)) {
				return this.values[idxStart] + index - firstIndex;
			}
			firstIndex = endIndex + 1;
		}

		throw new IndexOutOfBoundsException(Integer.toString(index));
	}

	public  IntegerList();
	public  IntegerList(int value);
	public  IntegerList(int start, int end);
	public  IntegerList(Collection<? extends Integer> collection);

}