Adds a new label to the dictionary if it has not been added yet. Returns the ID of the new
label in the dictionary.

@param label add this label to the dictionary if it does not exist yet
@return ID of label in the dictionary
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();
		}
	}
1145021
public static Label.Builder generateLabelBuilder(final String label) {
        return addLabel(Label.newBuilder(), Locale.getDefault(), label);
    }
1088376
public void addSequenceLabel(@NonNull T label) {
        this.labels.add(label);
        if (this.label == null)
            this.label = label;
    }
1094311
def get_label(self, name):
        """"""
        label_tag = self._find_label(name)
        return _Label(label_tag.get('id'), label_tag.get('color'), label_tag.text)
161232
def label_with_id(label_id, options = {})
      if options && options[:index] then
        label(:id => label_id.to_s, :index => options[:index]).text
      else
        label(:id, label_id.to_s).text
      end
    end
849832
public void setLabel (String label)
    {
        _label.setText(label);
        _label.setVisible(!StringUtil.isBlank(label));
    }
1042989
def add(self, label):
        
        label.label_list = self
        self.label_tree.addi(label.start, label.end, label)
1263659
private String getLabel(int i)
	{
		for (String label : labelMap.keySet())
		{
			if (labelMap.get(label) == i) return label;
		}
		return null;
	}
615634
public static Label newLabel(final String id, final String label)
	{
		return ComponentFactory.newLabel(id, Model.of(label));
	}
230004
public void add(Constraint constr, String... label)
	{
		checkLabels(constr.canGenerate(), label);

		int[] ind = convertLabelsToInds(label);

		if (ind.length != constr.getVariableSize())
		{
			throw new IllegalArgumentException("Mapped elements do not match the constraint size.");
		}

		// This will also increment lastIndex if necessary
		add(constr, ind);

		if (!hasLabel(label[label.length - 1]) && constr.canGenerate())
		{
			label(label[label.length - 1], lastIndex);
		}
	}
143169
public void addLabel(Label label) {
        assertNotNull(label);
        labels.add(label);
        label.setParent(this);
    }
1271321
public void updateLabel(String oldLabel, String newLabel)
	{
		if (hasLabel(newLabel)) throw new IllegalArgumentException(
			"The label \"" + newLabel + "\" already exists.");

		int i = indexOf(oldLabel);
		labelMap.remove(oldLabel);
		labelMap.put(newLabel, i);
	}
722350
public IntWritable getValueIntWritable(String label) {
        HadoopObject o = getHadoopObject(VALUE, label, ObjectUtil.INTEGER, "Integer");
        if (o == null) {
            return null;
        }
        return (IntWritable) o.getObject();
    }
963575
public void setLabel(String label) {
        this.label.setText(label);

        if (!getPlaceholder().isEmpty()) {
            this.label.setStyleName(CssName.ACTIVE);
        }
    }
340334
public void setLabel(java.lang.String label) {
        getStateHelper().put(PropertyKeys.label, label);
    }
487986
public function addLabel($label)
    {
        if (null !== $label) {
            $l = (string) $label;
            if (!$this->hasLabel($l)) {
                $this->labels->add($l);

                return true;
            }
        }

        return false;
    }
832555
public int add(int label,float score) {
		int i = 0;
		int max;
		if(n==-1)
			max = scores.size();
		else
			max = n>scores.size()?scores.size():n;

			for (i = 0; i < max; i++) {
				if (score > scores.get(i))
					break;
			}
			//TODO: 没有删除多余的信息
			if(n!=-1&&i>=n)
				return -1;
			if(i<scores.size()){
				scores.insert(i,score);
				labels.insert(i,label);
			}else{
				scores.add(score);
				labels.add(label);
			}
			return i;
	}