Adds a new version number.

@param number version number (not negative).
@param label version number label (optional).
@return version descriptor.
@throws IllegalArgumentException if version number is illegal.

@since v1.1.0
512153
public Version append(int number, String label) {
        validateNumber(number);
        return appendNumber(number, label);
    }
126890
private void addWeekNumberLabels() {
        weekNumberLabels = new ArrayList<JLabel>();
        int weekNumberLabelColumnX = constantFirstWeekNumberLabelCell.x;
        int weekNumberLabelWidthInCells = 1;
        int weekNumberLabelHeightInCells = 1;
        for (int i = 0; i < 6; ++i) {
            int weekNumberLabelRowY = (i + constantFirstWeekNumberLabelCell.y);
            JLabel weekNumberLabel = new JLabel();
            weekNumberLabel.setHorizontalAlignment(SwingConstants.CENTER);
            weekNumberLabel.setVerticalAlignment(SwingConstants.CENTER);
            weekNumberLabel.setBorder(new EmptyBorder(constantWeekNumberLabelInsets));
            weekNumberLabel.setOpaque(true);
            weekNumberLabel.setText("3" + i);
            weekNumberLabel.setVisible(false);
            CellConstraints constraints = CC.xywh(weekNumberLabelColumnX, weekNumberLabelRowY,
                weekNumberLabelWidthInCells, weekNumberLabelHeightInCells);
            centerPanel.add(weekNumberLabel, constraints);
            weekNumberLabels.add(weekNumberLabel);
        }
        setSizeOfWeekNumberLabels();
    }
237576
public static InsnList addLabel(LabelNode labelNode) {
        Validate.notNull(labelNode);

        InsnList ret = new InsnList();
        ret.add(labelNode);

        return ret;
    }
197703
public int store(String label) {
		if (StrInt.containsKey(label)) {
			return (StrInt.get(label).intValue());
		} else if (!newLabelsAllowed) {
			return KEY_DUMMY_LABEL;
		} else { // store label
			Integer intKey = new Integer(count++);
			StrInt.put(label, intKey);
			IntStr.put(intKey, label);

			return intKey.intValue();
		}
	}
979272
public synchronized CheckBox setLabel(String label) {
        if(label == null) {
            throw new IllegalArgumentException("Cannot set CheckBox label to null");
        }
        this.label = label;
        invalidate();
        return this;
    }
1016394
public void setLabel(final String label) {
        if (label != null)
            attrMixin.setAttribute(LABEL, label);
        else
            attrMixin.removeAttribute(LABEL);
    }
1145021
public static Label.Builder generateLabelBuilder(final String label) {
        return addLabel(Label.newBuilder(), Locale.getDefault(), label);
    }
1168588
async function deleteLabel(prNumber, label) {
  logger.debug(`Deleting label ${label} from #${prNumber}`);
  const azureApiGit = await azureApi.gitApi();
  await azureApiGit.deletePullRequestLabels(config.repoId, prNumber, label);
}
233937
private void addLabelHoverHandler(Label label) {

        removeLabelHoverHandler();
        LabelHoverHandler hoverHandler = new LabelHoverHandler();
        m_labelOutRegistration = label.addMouseOutHandler(hoverHandler);
        m_labelOverRegistration = label.addMouseOverHandler(hoverHandler);
    }
884384
private Label getOrCreateLabel(final String name) {

		Label label = labelCache.get(name);
		if (label == null) {

			label = new LabelImpl(name);
			labelCache.put(name, label);
		}

		return label;
	}
927391
public static VersionNumber parseVersion(@Nonnull final String version) {
		return VersionParser.parseVersion(Check.notNull(version, "version"));
	}
544077
protected void addLabelForNumbers(ItemIdValue itemIdValue) {

		String qid = itemIdValue.getId();

		try {
			// Fetch the online version of the item to make sure we edit the
			// current version:
			ItemDocument currentItemDocument = (ItemDocument) dataFetcher
					.getEntityDocument(qid);
			if (currentItemDocument == null) {
				System.out.println("*** " + qid
						+ " could not be fetched. Maybe it has been deleted.");
				return;
			}

			// Check if we still have exactly one numeric value:
			QuantityValue number = currentItemDocument
					.findStatementQuantityValue("P1181");
			if (number == null) {
				System.out.println("*** No unique numeric value for " + qid);
				return;
			}

			// Check if the item is in a known numeric class:
			if (!currentItemDocument.hasStatementValue("P31", numberClasses)) {
				System.out
						.println("*** "
								+ qid
								+ " is not in a known class of integer numbers. Skipping.");
				return;
			}

			// Check if the value is integer and build label string:
			String numberString;
			try {
				BigInteger intValue = number.getNumericValue()
						.toBigIntegerExact();
				numberString = intValue.toString();
			} catch (ArithmeticException e) {
				System.out.println("*** Numeric value for " + qid
						+ " is not an integer: " + number.getNumericValue());
				return;
			}

			// Construct data to write:
			ItemDocumentBuilder itemDocumentBuilder = ItemDocumentBuilder
					.forItemId(itemIdValue).withRevisionId(
							currentItemDocument.getRevisionId());
			ArrayList<String> languages = new ArrayList<>(
					arabicNumeralLanguages.length);
			for (int i = 0; i < arabicNumeralLanguages.length; i++) {
				if (!currentItemDocument.getLabels().containsKey(
						arabicNumeralLanguages[i])) {
					itemDocumentBuilder.withLabel(numberString,
							arabicNumeralLanguages[i]);
					languages.add(arabicNumeralLanguages[i]);
				}
			}

			if (languages.size() == 0) {
				System.out.println("*** Labels already complete for " + qid);
				return;
			}

			logEntityModification(currentItemDocument.getEntityId(),
					numberString, languages);

			dataEditor.editItemDocument(itemDocumentBuilder.build(), false,
					"Set labels to numeric value (Task MB1)");
		} catch (MediaWikiApiErrorException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
699453
public void add(Collection<Label> labels)
    {
        for(Label label : labels)
            this.labels.put(label.getKey(), label);
    }
341011
public void setVersion(int version)
    {
        if (version < 0 || 255 < version)
        {
            throw new IllegalArgumentException("'version' is out of the valid range: " + version);
        }

        mVersion = version;

        getData()[VERSION_INDEX] = (byte)(version & 0xFF);
    }
848353
public void update(int number) {
        byte[] numberInBytes = new byte[ByteUtils.SIZE_OF_INT];
        ByteUtils.writeInt(numberInBytes, number, 0);
        update(numberInBytes);
    }
713660
@Deprecated
	public void setLabel(String... labels) {
		this.label = utils.join(LABEL_DELIMITER, (Object[]) labels);
	}
593102
public FieldErrorBuilder label(final Optional<String> label) {
        label.ifPresent(l -> label(l));
        return this;
    }