@@ -0,0 +1,1296 @@
+package com.abusalimov.mrcalc.runtime;%0A%0A/**%0A * A simple and naive implementation of range of longs.%0A *%0A * @author Eldar Abusalimov%0A */%0Apublic class LongRange extends LongSequence %7B%0A    /**%0A     * Creates a new range starting from zero.%0A     *%0A     * @param endExclusive the end boundary of the range (exclusive), which is also the length of the range%0A     */%0A    public LongRange(long endExclusive) %7B%0A        this(0, endExclusive);%0A    %7D%0A%0A    /**%0A     * Creates a new range filled by integers between the specified boundaries.%0A     *%0A     * @param startInclusive the start boundary of the range (inclusive)%0A     * @param endExclusive   the end boundary of the range (exclusive)%0A     */%0A    public LongRange(long startInclusive, long endExclusive) %7B%0A        super(createArray(startInclusive, endExclusive));%0A    %7D%0A%0A    private static long%5B%5D createArray(long startInclusive, long endExclusive) %7B%0A        long longLength = Math.max(0, endExclusive - startInclusive);%0A        if (longLength %3E Integer.MAX_VALUE) %7B%0A            throw new ArithmeticException(%22Sequence range size overflow%22);%0A        %7D%0A        int length = (int) longLength;%0A%0A        long%5B%5D ret = new long%5Blength%5D;%0A        for (int i = 0; i %3C length; i++) %7B%0A            ret%5Bi%5D = startInclusive + i;%0A        %7D%0A        return ret;%0A    %7D%0A%7D%0A

Add LongRange as a subclass of LongSequence