code: public static Interval 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 Interval(from, to, stepBy);
      }
docs: Returns an Interval for the range of integers inclusively between from and to with the specified
  stepBy value.