Sets the weak learner used for regressions . If it also supports
classification that will be set as well.
@param weakR the weak learner to use
977244
public void setWeakLearner(Regressor weakR)
    {
        if(weakR == null)
            throw new NullPointerException();
        this.weakR = weakR;
        if(weakR instanceof Classifier)
            this.weakL = (Classifier) weakR;
    }
1092714
public void setListener(Listener listener) {
        if (null != listener) {
            listenerReference = new WeakReference<Listener>(listener);
        } else {
            listenerReference = null;
        }
    }
789552
public void setScalarSerializer (Class type, ScalarSerializer serializer) {
		if (type == null) throw new IllegalArgumentException("type cannot be null.");
		if (serializer == null) throw new IllegalArgumentException("serializer cannot be null.");
		scalarSerializers.put(type, serializer);
	}
1369232
private boolean shouldAddWeakRelationTarget(CmsResource weakRelationTarget) {

        for (String typeName : VALID_WEAK_RELATION_TARGET_TYPES) {
            if (OpenCms.getResourceManager().matchResourceType(typeName, weakRelationTarget.getTypeId())) {
                return true;
            }
        }
        return false;
    }
535810
private void doSetParent(Logger newParent) {

        // System.err.println("doSetParent \"" + getName() + "\" \""
        //                              + newParent.getName() + "\"");

        synchronized (treeLock) {

            // Remove ourself from any previous parent.
            LogManager.LoggerWeakRef ref = null;
            if (parent != null) {
                // assert parent.kids != null;
                for (Iterator<LogManager.LoggerWeakRef> iter = parent.kids.iterator(); iter.hasNext(); ) {
                    ref = iter.next();
                    Logger kid =  ref.get();
                    if (kid == this) {
                        // ref is used down below to complete the reparenting
                        iter.remove();
                        break;
                    } else {
                        ref = null;
                    }
                }
                // We have now removed ourself from our parents' kids.
            }

            // Set our new parent.
            parent = newParent;
            if (parent.kids == null) {
                parent.kids = new ArrayList<>(2);
            }
            if (ref == null) {
                // we didn't have a previous parent
                ref = manager.new LoggerWeakRef(this);
            }
            ref.setParentRef(new WeakReference<Logger>(parent));
            parent.kids.add(ref);

            // As a result of the reparenting, the effective level
            // may have changed for us and our children.
            updateEffectiveLevel();

        }
    }
119710
function WeakSet_constructor(iterable) { // @arg Iterator|Array = null
    this._value = [];

    var that = this;

    if (Array.isArray(iterable)) {
        iterable.forEach(function(value) {
            that["add"](value);
        });
    } else if (iterable && iterable["next"]) {
        var result = null;

        while ( (result = iterable["next"]()) ) {
            if (result["done"]) {
                break;
            }
            this["add"](result["value"]);
        }
    }
}
270751
private static final void setInit(final CClassLoader loader) {
		loader.booInit = true;

		for (final Iterator it = loader.getChildLoader(); it.hasNext();) {
			final Map.Entry entry = (Map.Entry) it.next();
			CClassLoader.setInit((CClassLoader) entry.getValue());
		}
	}
168822
function WeakMap_constructor(iterable) { // @arg Iterator|Array = null
    this._index = [];
    this._value = [];

    var that = this;

    if (Array.isArray(iterable)) {
        iterable.forEach(function(value) {
            that["set"](value[0], value[1]);
        });
    } else if (iterable && iterable["next"]) {
        var result = null;

        while ( (result = iterable["next"]()) ) {
            if (result["done"]) {
                break;
            }
            this["set"](result["value"][0], result["value"][1]);
        }
    }
}
830440
protected void addListeningIterator(IClockwiseIterator iterator) {
		if (this.listeningIterators == null) {
			this.listeningIterators = new WeakArrayList<>();
		}
		this.listeningIterators.add(iterator);
	}
795129
public final void setMinNumber(final int minNumber) {
        Condition.INSTANCE.ensureSmaller(minNumber, getMaxNumber(),
                "The minimum number must be less than the maximum number");
        this.minNumber = minNumber;
        setNumber(Math.max(getNumber(), minNumber));
    }
1127011
public void setTargetResolver( ITargetHandlerResolver targetHandlerResolver ) {

		if( targetHandlerResolver == null ) {
			this.targetConfigurator.setTargetHandlerResolver( this.defaultTargetHandlerResolver );
			this.instancesMngr.setTargetHandlerResolver( this.defaultTargetHandlerResolver );
		} else {
			this.targetConfigurator.setTargetHandlerResolver( targetHandlerResolver );
			this.instancesMngr.setTargetHandlerResolver( targetHandlerResolver );
		}
	}
1216484
public void setClassifiers(java.util.Collection<Classifier> classifiers) {
        if (classifiers == null) {
            this.classifiers = null;
            return;
        }

        this.classifiers = new java.util.ArrayList<Classifier>(classifiers);
    }
1272507
public void setFailures(java.util.Collection<LayerFailure> failures) {
        if (failures == null) {
            this.failures = null;
            return;
        }

        this.failures = new java.util.ArrayList<LayerFailure>(failures);
    }
1003139
@Deprecated
    public void weakAddWatcher(Listener watcher) {
        if (watcher == null) {
            throw new IllegalArgumentException("Null watcher added");
        }

        synchronized (mutex) {
            if (watcherExecutor.isShutdown()) {
                throw new IllegalStateException("Adding watcher on closed FileWatcher");
            }
            watchers.add(new WeakReference<>(watcher)::get);
        }
    }
593197
public void setR(double R)
    {
        if(R <= 0 || Double.isNaN(R) || Double.isInfinite(R))
            throw new IllegalArgumentException("R must be positive, not " + R);
        this.R = R;
    }
927135
public <T extends CacheSpec<K, V>> T weakValues() {
      this.weakValues = true;
      return Cast.as(this);
   }
868295
public void setClassLoader(GroovyClassLoader loader) {
        ClassLoader parent = Thread.currentThread().getContextClassLoader();
        if (parent == null) parent = ProcessingUnit.class.getClassLoader();
        this.classLoader = (loader == null ? new GroovyClassLoader(parent, configuration) : loader);
    }