/* (non-Javadoc)
@see tuwien.auto.calimero.link.KNXNetworkLink#setKNXMedium
(tuwien.auto.calimero.link.medium.KNXMediumSettings)
768988
public void setKNXMedium(KNXMediumSettings settings)
	{
		if (settings == null)
			throw new KNXIllegalArgumentException("medium settings are mandatory");
		if (medium != null && !settings.getClass().isAssignableFrom(medium.getClass())
			&& !medium.getClass().isAssignableFrom(settings.getClass()))
			throw new KNXIllegalArgumentException("medium differs");
		medium = settings;
	}
291947
@Override
	public void setX(double min, double max) {
		if (min <= max) {
			this.minxProperty.set(min);
			this.maxxProperty.set(max);
		} else {
			this.minxProperty.set(max);
			this.maxxProperty.set(min);
		}
	}
107525
@Override
    public void setParameters(Object[] params) throws CDKException {
        if (params.length != 1) throw new CDKException("ElementRule expects one parameters");

        if (!(params[0] == null || params[0] instanceof MolecularFormulaRange))
            throw new CDKException("The parameter must be of type MolecularFormulaExpand");

        mfRange = (MolecularFormulaRange) params[0];
    }
952109
@SuppressWarnings("unchecked")
    public void setSettings(Object presets) {

        if (presets == null) {
            m_settingPresets = null;
        } else if (!(presets instanceof Map)) {
            throw new IllegalArgumentException(
                "cms:container -- value of 'settings' attribute  should be a map, but is "
                    + ClassUtils.getCanonicalName(presets));
        } else {
            m_settingPresets = new HashMap<>((Map<String, String>)presets);
        }
    }
833675
public void setKeyMetadata(KeyMetadata keyMetadata) {
    if (this.keyMetadata != null) {
      String format = "Class %s has two fields, %s and %s marked with %s annotation. Only one "
          + "field can be marked as Key. ";
      String message = String.format(format, entityClass.getName(), this.keyMetadata.getName(),
          keyMetadata.getName(), Key.class.getName());
      throw new EntityManagerException(message);

    }
    this.keyMetadata = keyMetadata;
  }
577984
private function setDoctrine(): void
    {
        $config        = Setup::createAnnotationMetadataConfiguration([], true, null, null, false);
        $entityManager = EntityManager::create([
            'driver'   => $this->config('DSN'),
            'user'     => $this->config('user'),
            'password' => $this->config('password'),
            'dbname'   => $this->config('name'),
        ], $config);

        $this->container()->set('db', $entityManager, 'raw');
    }
818478
func (s *AccountTakeoverActionsType) SetMediumAction(v *AccountTakeoverActionType) *AccountTakeoverActionsType {
	s.MediumAction = v
	return s
}
1065596
@Override
    public void setSetting(String setting) throws CDKException {
        try {
            Integer.parseInt(setting);
            this.setting = setting;
        } catch (NumberFormatException exception) {
            throw new CDKException("Setting " + setting + " is not an integer.", exception);
        }
    }
265399
def set_dyn_config(self, field, expression, collection=None):
        """"""
        if self.kbdefs:
            # update
            self.kbdefs.output_tag = field
            self.kbdefs.search_expression = expression
            self.kbdefs.collection = collection
            db.session.merge(self.kbdefs)
        else:
            # insert
            self.kbdefs = KnwKBDDEF(output_tag=field,
                                    search_expression=expression,
                                    collection=collection)
286996
@Override
    public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException {
        this.weights = new HashMap<>();
        if (weights.containsKey(conf.getKERAS_PARAM_NAME_W()))
            this.weights.put(DefaultParamInitializer.WEIGHT_KEY, weights.get(conf.getKERAS_PARAM_NAME_W()));
        else
            throw new InvalidKerasConfigurationException(
                    "Parameter " + conf.getKERAS_PARAM_NAME_W() + " does not exist in weights");
        if (hasBias) {
            if (weights.containsKey(conf.getKERAS_PARAM_NAME_B()))
                this.weights.put(DefaultParamInitializer.BIAS_KEY, weights.get(conf.getKERAS_PARAM_NAME_B()));
            else
                throw new InvalidKerasConfigurationException(
                        "Parameter " + conf.getKERAS_PARAM_NAME_B() + " does not exist in weights");
        }
        removeDefaultWeights(weights, conf);
    }
473938
@Override
    public void setSetting(String setting) throws CDKException {
        if (setting.equals("true") || setting.equals("false")) {
            this.setting = setting;
        } else if (setting.equals("yes") || setting.equals("y")) {
            this.setting = "true";
        } else if (setting.equals("no") || setting.equals("n")) {
            this.setting = "false";
        } else {
            throw new CDKException("Setting " + setting + " is not a boolean.");
        }
    }
843599
public void setKappa(double kappa)
    {
        if(kappa < 0.5 || kappa > 1.0 || Double.isNaN(kappa))
            throw new IllegalArgumentException("Kapp must be in [0.5, 1], not " + kappa);
        this.kappa = kappa;
    }
728357
@Override
	public void setX(double min, double max) {
		if (min <= max) {
			this.minx = min;
			this.maxx = max;
		} else {
			this.minx = max;
			this.maxx = min;
		}
	}
302106
public void setSkeleton(GVRSkeleton newSkel)
    {
        if (mSkeleton == newSkel)
        {
            return;
        }
        int[] newMap = new int[newSkel.getNumBones()];
        for (int i = 0; i < mBoneMap.length; ++i)
        {
            int oldIndex = mBoneMap[i];
            String boneName = mSkeleton.getBoneName(oldIndex);
            int newIndex = newSkel.getBoneIndex(boneName);
            if (newIndex >= 0)
            {
                newMap[i] = newIndex;
            }
            else
            {
                throw new IllegalArgumentException("Destination skeleton does not have bone " + boneName);
            }
        }
        mBoneMap = newMap;
        mSkeleton = newSkel;
    }
186249
@Override
	public void setY(double min, double max) {
		if (min <= max) {
			this.miny = min;
			this.maxy = max;
		} else {
			this.miny = max;
			this.maxy = min;
		}
	}
1163094
def set(self, **kwargs):
        
        if len(kwargs)==0: return self
        
        # Set settings
        for k in list(kwargs.keys()): self[k] = kwargs[k]
        
        # Plot if we're supposed to.
        if self['autoplot'] and not self._initializing: self.plot()

        return self
506573
@Override
  public void setRadius(float radius) {
    Preconditions.checkState(radius >= 0);
    Arrays.fill(mCornerRadii, radius);
    mRadiiNonZero = (radius != 0);
    mIsPathDirty = true;
    invalidateSelf();
  }