Adds an object to this relation.

@param object The object to add to this relation.
19574
public void add(T object) {
    if (object == null) throw new IllegalArgumentException("null AVObject");
    if (StringUtil.isEmpty(targetClass)) {
      targetClass = object.getClassName();
    }
    if (!StringUtil.isEmpty(targetClass) && !targetClass.equals(object.getClassName())) {
      throw new IllegalArgumentException("Could not add class '" + object.getClassName()
              + "' to this relation,expect class is '" + targetClass + "'");
    }
    parent.addRelation(object, key);
  }
298651
@Override
    public boolean add(Object o) {
        ConnectorProperty connectorPropertyToAdd = (ConnectorProperty) o;
        String nameToAdd = connectorPropertyToAdd.getName();

        ConnectorProperty connectorProperty = null;
        String name = null;
        Enumeration<Object> e = this.elements();
        while (e.hasMoreElements()) {

            connectorProperty = (ConnectorProperty) e.nextElement();
            name = connectorProperty.getName();
            if (name.equals(nameToAdd)) {
                if (tc.isDebugEnabled()) { 
                    String value = (String) connectorPropertyToAdd.getValue(); 
                    if (!value.equals("")) { 
                        if (name.equals("UserName") || name.equals("Password")) { 
                            Tr.debug(tc, "DUPLICATE_USERNAME_PASSWORD_CONNECTOR_PROPERTY_J2CA0103", new Object[] { (ConnectorProperty) o });
                        } else {
                            Tr.warning(tc, "DUPLICATE_CONNECTOR_PROPERTY_J2CA0308", new Object[] { (ConnectorProperty) o });
                        } 
                    }
                }
                return true;
            }

        }

        return super.add(o);

    }
1083009
public boolean addRelatedObject(String objectType, String id, String content)
    {
        Map<String, Object> container = new HashMap<String, Object>();
        
        if (objectType != null)
        {
            container.put("objectType", objectType);
        }
        else
        {
            return false;
        }
        if (id != null)
        {
            container.put("id", id);
        }
        if (content != null)
        {
            container.put("content", content);
        }

        related.add(container);
        return true;
    }
740888
function add(object) {
  var args = Array.prototype.slice.call(arguments, 1);
  //loop through all over the arguments
  forEach(args, function(value, i) {
    switch(typeof object) {
      case 'object':
        isArray(object)
          ? object.push(value)
          : extend(object, isObject(value) ? value : creObject(i, value));
        break;
      case 'string':
        object += isString(value) ? value : '';
        break;
      case 'number':
        object += isNumber(value) ? value : 0;
    }
  });
  return object;
}
879628
public void addRelation(String property, Relation relation)
    {
        relationsMap.put(property, relation);
        addRelationName(relation);
    }
353152
public synchronized boolean registerObject(Object object) {
        if (!MiscUtil.containsInstance(registeredObjects, object)) {
            if (object instanceof IRegisterEvent) {
                IRegisterEvent onRegister = (IRegisterEvent) object;
                onRegisterList.add(onRegister);
                
                for (Object obj : registeredObjects) {
                    onRegister.registerObject(obj);
                }
            }
            
            registeredObjects.add(object);
            
            for (IRegisterEvent onRegister : onRegisterList) {
                onRegister.registerObject(object);
            }
            
            return true;
        }
        
        return false;
    }
101412
public function append($object)
    {
        $member = static::checkMember($object);
        # TODO: merge if duplicated
        if (!$this->contains($member)) {
            $this->members[] = $member;
        }
    }
1119495
public void writeObject(Object object)
        throws IOException
    {
        if (object == null) {
            writeNull();
            return;
        }

        Serializer serializer;

        serializer = _serializerFactory.getSerializer(object.getClass());

        serializer.writeObject(object, this);
    }
570005
public IndexCommitBuilder insert(Object object) {
        updateModelClassSet(object);
        getInsertList(object.getClass()).add((OpenEngSBModel) object);
        return this;
    }
294029
public static void put(Map<String,Object> structure, String name, Object object)
    {
        if (name != null && object != null)
        {
            structure.put(name, object);
        }
    }
788387
@Override
    public boolean add(D item) throws UnsupportedOperationException {
        readOnlyGuardCondition();
        instance.addRelation(entity, writeAttributeName, item);
        entity.save();
        return true;
    }
1321560
public void put(DBObject key, Object object) {
        //noinspection unchecked
        objectCache.put(flatten(key.toMap()), new WeakReference(object));
    }
1075920
protected void handleUpdatedObject(final Object object) {
		runWithWriteLock(new Runnable() {
			public void run() {
				int index = getFinalEventList().indexOf(object);
				if (index >= 0) {
					getFinalEventList().set(index, object);
				}
			}
		});
	}
1047704
public function add($object)
    {
        $inheritance = $object->getInheritance();
        if (!empty($inheritance)) {
            $this->virtualObjects[$this->getObjectKeyWithVirtual($object)] = $this->objects[$this->getObjectKeyWithType($object, $object->getInheritance())] = $object;
        } else {
            parent::add($object);
        }
        return $this;
    }
1002737
public void addObject (int x, int y, Object object)
    {
        Record record = new Record(x, y, object);

        // if this is the very first element, we have to insert it
        // straight away because our binary search algorithm doesn't work
        // on empty arrays
        if (_size == 0) {
            _records[_size++] = record;
            return;
        }

        // figure out where to insert it
        int ipoint = binarySearch(x);

        // expand the records array if necessary
        if (_size >= _records.length) {
            int nsize = _size*2;
            Record[] records = new Record[nsize];
            System.arraycopy(_records, 0, records, 0, _size);
            _records = records;
        }

        // shift everything down
        if (ipoint < _size) {
            System.arraycopy(_records, ipoint, _records, ipoint+1,
                             _size-ipoint);
        }

        // insert the record
        _records[ipoint] = record;
        _size++;
    }
908283
public void addObject(E object){
		if(stopped==true){
			log.warn("Adding a new object ignored, the pool is stopped");
			return ;
		}

		// add to the end
		objectList.add(object);
//		if (log.isDebugEnabled()){
//			log.debug("ADD, size:'"+objectListSize()+"' "+object.hashCode()+" stopped:"+stopedThreadNumber+" "+object.toString());
//		}

		// Waits for an stoped worked before returning !!!!
		// except if this thread is a thread of the pool 
		if (!objectList.isEmpty() && stopedThreadNumber==0 && !threadMap.containsKey(Thread.currentThread().getName())){
			synchronized (threadList) {
				try {
					threadList.wait();
				} catch (InterruptedException e) {
					
				}
			}
		}
		
		synchronized (objectList) {
			objectList.notify();
		}
	}
960266
public void addSubject(String[] subject) {
		XmpArray array = new XmpArray(XmpArray.UNORDERED);
		for (int i = 0; i < subject.length; i++) {
			array.add(subject[i]);
		}
		setProperty(SUBJECT, array);
	}