code: public static Integer[] sequence(final Integer from, final Integer to, final Integer step) {
          
          Validate.notNull(from, "Value to start the sequence from cannot be null");
          Validate.notNull(to, "Value to generate the sequence up to cannot be null");
          Validate.notNull(step, "Step to generate the sequence cannot be null");
          
          final int iFrom = from.intValue();
          final int iTo = to.intValue();
          final int iStep = step.intValue();
  
          if (iFrom == iTo) {
              return new Integer[] {Integer.valueOf(iFrom)};
          }
  
          if (iStep == 0) {
              // with iStep == 0, this would only be valid if iFrom == iTo, which it isn't - the rest are impossible
              throw new IllegalArgumentException("Cannot create sequence from " + iFrom + " to " + iTo + " with step " + iStep);
          }
  
          final List<Integer> values = new ArrayList<Integer>(10);
          if (iFrom < iTo && iStep > 0) {
              int i = iFrom;
              while (i <= iTo) {
                  values.add(Integer.valueOf(i));
                  i += iStep;
              }
          } else if (iFrom > iTo && iStep < 0){
              // iFrom > iTo
              int i = iFrom;
              while (i >= iTo) {
                  values.add(Integer.valueOf(i));
                  i += iStep;
              }
          }
  
          return values.toArray(new Integer[values.size()]);
          
      }
docs: <p>
  Produces an array with a sequence of integer numbers, using a step.
  </p>
  
  @param from value to start the sequence from
  @param to value to produce the sequence to
  @param step the step to be used
  @return the Integer[] sequence
  
  @since 2.0.9