public static IntInterval fromToBy(int from, int to, int stepBy)
    {
        if (stepBy == 0)
        {
            throw new IllegalArgumentException("Cannot use a step by of 0");
        }
        if (from > to && stepBy > 0 || from < to && stepBy < 0)
        {
            throw new IllegalArgumentException("Step by is incorrect for the range");
        }
        return new IntInterval(from, to, stepBy);
    }
public static IntInterval fromToBy ( int from , int to , int stepBy ) { if ( stepBy == 0 ) { throw new IllegalArgumentException ( "Cannot use a step by of 0" ) ; } if ( from > to && stepBy > 0 || from < to && stepBy < 0 ) { throw new IllegalArgumentException ( "Step by is incorrect for the range" ) ; } return new IntInterval ( from , to , stepBy ) ; }
Returns an IntInterval for the range of integers inclusively between from and to with the specified
stepBy value.