code: public VarConfig getVarConfig(int configIndex) {
          // Configuration as an array of ints, one for each variable.
          int i;
          int[] states = getVarConfigAsArray(configIndex);
          
          VarConfig config = new VarConfig();
          i=0;
          for (Var var : this) {
              config.put(var, states[i++]);
          }
          return config;
      }
docs: Gets the variable configuration corresponding to the given configuration index.
  @param configIndex The config index.
  @return The variable configuration.