Adds a new contact to the list of contacts. The contact's name is obtained from {@link newNameField}.
963391
private void addNewContact() {
		String name = newNameField.getText();
		if (name != null && !"".equals(name)) {
			List list = new ArrayList(repeater.getBeanList());
			list.add(new ContactDetails(name, null, new String[0]));
			repeater.setBeanList(list);
		}
		newNameField.setText("");
	}
101175
void addFieldInfo(String className, List<FieldInfo> fieldInfoList) {
        if (ivFieldInfoMap == null) {
            ivFieldInfoMap = new HashMap<String, List<FieldInfo>>();
        }
        ivFieldInfoMap.put(className, fieldInfoList);
    }
323387
private void initContactSet() {

		// Initialise an array of atoms
		atoms = new Atom[groups.length];
		// Remake this local var
		indResMap = new HashMap<>();
		for (int i=0 ; i < groups.length ; i++){
			SecStrucGroup one = groups[i];
			indResMap.put(one.getResidueNumber(), i);
			atoms[i] = one.getCA();
		}
		Grid grid = new Grid(CA_MIN_DIST);
		if(atoms.length==0){
			contactSet = new AtomContactSet(CA_MIN_DIST);
		}
		else{
			grid.addAtoms(atoms);
			contactSet = grid.getAtomContacts();
		}
	}
768217
private void addRelationName(Relation rField)
    {
        if (rField != null && !rField.isRelatedViaJoinTable())
        {
            String relationName = getJoinColumnName(rField.getProperty());
            if (rField.getProperty().isAnnotationPresent(PrimaryKeyJoinColumn.class))
            {
                relationName = this.getIdAttribute().getName();
            }

            addToRelationNameCollection(relationName);
        }
    }
261948
private function AddNameField()
    {
        $name = 'Name';
        $this->AddField(Input::Text($name, $this->area->GetName()));
        $this->SetRequired($name);
        $this->AddValidator($name, DatabaseCount::UniqueFieldAnd($this->area, $name, $this->LayoutCondition()));
    }
1205299
public boolean add(String name, Object value)
    {
        if(name == null)
            throw new NullPointerException("name == null");
        add(name);
        add(value.toString());
        return true;
    }
1086949
def add(contacts)
      contact_ids = [contacts].flatten.uniq.compact.map(&:id)
      response = Hubspot::Connection.post_json(ADD_CONTACT_PATH, params: { list_id: @id }, body: { vids: contact_ids })
      response['updated'].sort == contact_ids.sort
    end
327172
public Contact[] getSelectedContacts() {
		int[] selected = getTable().getSelectedRows();
		Contact[] contacts = new Contact[selected.length];
		for (int i = 0; i < selected.length; i++) {
			contacts[i] = (Contact) getTableModel().getElementAt(selected[i]);
		}
		return contacts;
	}
85005
final public function addNew()
    {
        $this->originalValues = null;
        $this->values = $this->emptyValuesFromDataFields();
        $this->mode = self::RSMODE_CONNECTED_ADDNEW;
    }
1038190
def add_field(self, field):
        """"""
        self.remove_field(field.name)
        self._fields[field.name] = field

        if field.default is not None:
            if six.callable(field.default):
                self._default_callables[field.key] = field.default
            else:
                self._defaults[field.key] = field.default
1000708
protected function addToListBottom()
    {
        if ($this->isInList()) return;

        $newPosition = $this->getBottomPositionValue();

        if (null === $newPosition) {
            $newPosition = $this->listifyTop();
        } else {
            $newPosition += 1;
        }

        $this->setListifyPosition($newPosition);
    }
1183406
public function AddContactsToList($ContactListId, Request\AddContactsToList $AddContactsToList)
    {
        $uri = $this->getUri('/contact/list/%s/add', array($ContactListId));

        return $this->post($uri, $AddContactsToList);
    }
756481
private function AddMailFromNameField()
    {
        $name = 'MailFromName';
        $field = Input::Text($name, $this->settings->GetMailFromName());
        $this->AddField($field);
    }
965595
public Entity addFieldNames(String... fieldNames) {
		if (ArrayUtil.isNotEmpty(fieldNames)) {
			if (null == this.fieldNames) {
				return setFieldNames(fieldNames);
			} else {
				for (String fieldName : fieldNames) {
					this.fieldNames.add(fieldName);
				}
			}
		}
		return this;
	}
1036490
public AnnotationDescr addAnnotation( String name,
                                          String value ) {
        if ( this.annotations == null ) {
            this.annotations = new HashMap<String, AnnotationDescr>();
        } else {
            AnnotationDescr existingAnnotation = annotations.get( name );
            if (existingAnnotation != null) {
                existingAnnotation.setDuplicated();
                return existingAnnotation;
            }
        }
        AnnotationDescr annotation = new AnnotationDescr( name,
                                                          value );
        annotation.setResource(getResource());
        return this.annotations.put( annotation.getName(),
                                     annotation );
    }
752796
def create_contact(self, *args, **kwargs):
        """"""
        url = 'contacts.json'
        contact_data = {
            'active': True,
            'helpdesk_agent': False,
            'description': 'Freshdesk Contact'
        }
        contact_data.update(kwargs)
        payload = {
            'user': contact_data
        }

        return Contact(**self._api._post(url, data=payload)['user'])
681417
public T addParams(Iterable<? extends TemplateParam> newParams) {

    Set<String> seenParamKeys = new HashSet<>();
    if (this.params == null) {
      this.params = ImmutableList.copyOf(newParams);
    } else {
      for (TemplateParam oldParam : this.params) {
        seenParamKeys.add(oldParam.name());
      }
      this.params =
          ImmutableList.<TemplateParam>builder().addAll(this.params).addAll(newParams).build();
    }

    // Check new params.
    for (TemplateParam param : newParams) {
      if (param.name().equals("ij")) {
        errorReporter.report(param.nameLocation(), INVALID_PARAM_NAMED_IJ);
      }
      if (!seenParamKeys.add(param.name())) {
        errorReporter.report(param.nameLocation(), PARAM_ALREADY_DECLARED, param.name());
      }
    }
    return (T) this;
  }