code: public void put(Var var, String stateName) {
          int state = var.getState(stateName);
          if (state == -1) {
              throw new IllegalArgumentException("Unknown state name " + stateName + " for var " + var);
          }
          put(var, state);
      }
docs: Sets the state value to stateName for the given variable, adding it if necessary.