code: public void getVarConfigAsArray(int configIndex, int[] putInto) {
          if(putInto.length != this.size())
              throw new IllegalArgumentException();
          int i = putInto.length - 1;
          for (int v=this.size()-1; v >= 0; v--) {
              Var var = this.get(v);
              putInto[i--] = configIndex % var.getNumStates();
              configIndex /= var.getNumStates();
          }
      }
docs: this is the "no-allocation" version of the non-void method of the same name.