Set the major number.

@param major
The major number. The value should be in the range from 0 to 65535.

@throws IllegalArgumentException
The given value is out of the valid range.
357723
public void setMajor(int major)
    {
        if (major < 0 || 0xFFFF < major)
        {
            throw new IllegalArgumentException("'major' is out of the valid range: " + major);
        }

        mMajor = major;

        byte[] data = getData();
        data[MAJOR_INDEX    ] = (byte)((major >> 8) & 0xFF);
        data[MAJOR_INDEX + 1] = (byte)((major     ) & 0xFF);
    }
258584
public void setNumExecutors(@Nonnegative int n) throws IOException, IllegalArgumentException {
        if (n < 0) {
            throw new IllegalArgumentException("Incorrect field \"# of executors\": " + n +". It should be a non-negative number.");
        }
        if (this.numExecutors != n) {
            this.numExecutors = n;
            updateComputerList();
            save();
        }
    }
589059
public void setNumber(String v) {
    if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_number == null)
      jcasType.jcas.throwFeatMissing("number", "de.julielab.jules.types.PronounFeats");
    jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_number, v);}
403904
public static Number toNumber(Object value, Number defaultValue) {
		return convert(Number.class, value, defaultValue);
	}
99710
public void setValue(final Object value) {
        if (!(value instanceof Serializable)) {
            throw new IllegalArgumentException("The value muste be a instance of " + Serializable.class.getName());
        }
        this.value = (Serializable) value;
    }
1122215
def major(self, major: int) -> None:
        
        self.filter_negatives(major)
        self._major = major
14312
protected void set(final int n, final Rational value) {
        final int nindx = n / 2;
        if (nindx < a.size()) {
            a.set(nindx, value);
        } else {
            while (a.size() < nindx) {
                a.add(Rational.ZERO);
            }
            a.add(value);
        }
    }
20859
public void setProgress(int progress) {
    if (progress > mMax || progress < 0) {
      throw new IllegalArgumentException(
          String.format("Progress (%d) must be between %d and %d", progress, 0, mMax));
    }
    mProgress = progress;
    invalidate();
  }
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));
    }
615515
public void setInteger(String key, int value) {
        prefHelper_.prefsEditor_.putInt(key, value);
        prefHelper_.prefsEditor_.apply();
    }
703022
public void setPriority(int priority) throws IllegalArgumentException {
        if (priority < Thread.MIN_PRIORITY || priority > Thread.MAX_PRIORITY) {
            throw new IllegalArgumentException
                ("Priority out of range: " + priority);
        }

        synchronized (mPool) {
            mPriority = priority;
        }
    }
657898
@NonNull
    public Parameters setNumber(@NonNull String name, Number value) {
        return setValue(name, value);
    }
969621
private void setVersion(long number) {

        String result = "";
        for (int i = 0; i < 4; i++) {
            long mod = number % 1000L;
            number = number / 1000L;
            if (m_dots >= (4 - i)) {
                if (m_dots > (4 - i)) {
                    result = '.' + result;
                }
                result = "" + mod + result;
            }
        }

        m_version = result;
    }
382575
private void setScalarValue(
            final CommandLineArgumentParser commandLineArgumentParser,
            final List<String> originalValues) // Note that these might be tag surrogates
    {
        if (getHasBeenSet() || originalValues.size() > 1) {
            throw new CommandLineException.BadArgumentValue(
                    String.format("Argument '%s' cannot be specified more than once.", getArgumentAliasDisplayString()));
        }

        if (isFlag() && originalValues.isEmpty()){
            setArgumentValue(true);
        } else {
            final String stringValue = originalValues.get(0);
            Object value = null;
            if (stringValue.equals(NULL_ARGUMENT_STRING)) {
                if (getUnderlyingField().getType().isPrimitive()) {
                    throw new CommandLineException.BadArgumentValue(
                            String.format("Argument '%s' is not a nullable argument type.", getArgumentAliasDisplayString()));
                }
            } else {
                final Pair<String, String> normalizedSurrogatePair = getNormalizedTagValuePair(commandLineArgumentParser, stringValue);
                value = getValuePopulatedWithTags(normalizedSurrogatePair.getLeft(), normalizedSurrogatePair.getRight());
            }
            checkArgumentRange(value);
            setArgumentValue(value);
        }
    }
778823
public void setDelta(double delta)
    {
        if(delta <= 0 || delta >= 1 || Double.isNaN(delta))
            throw new IllegalArgumentException("delta must be in (0,1), not " + delta);
        this.delta = delta;
    }
1296564
public void setValue(String value) {
		try {
			this.uri = SipFactoryImpl.addressFactory.createURI(value);
		} catch (ParseException ex) {
			logger.error("Bad input arg", ex);
			throw new IllegalArgumentException("Bad input arg", ex);
		}
	}
649945
@PublicEvolving
	public void setInteger(ConfigOption<Integer> key, int value) {
		setValueInternal(key.key(), value);
	}