Appends the given object and State to the array.

@param obj
The value to append.
@param type
The type code of the value (see {@link Type})
@return {@link Collection#add(Object)} reference
496256
public boolean add(Object obj, Type type) {
		stateList.add(type);
		return super.add(obj);
	}
480715
public static void append(Appendable out, Object object) throws IOException {
        if (object instanceof String) {
            out.append((String) object);
        } else if (object instanceof Object[]) {
            out.append(toArrayString((Object[]) object));
        } else if (object instanceof Map) {
            out.append(toMapString((Map) object));
        } else if (object instanceof Collection) {
            out.append(toListString((Collection) object));
        } else if (object instanceof Writable) {
            Writable writable = (Writable) object;
            Writer stringWriter = new StringBuilderWriter();
            writable.writeTo(stringWriter);
            out.append(stringWriter.toString());
        } else if (object instanceof InputStream || object instanceof Reader) {
            // Copy stream to stream
            Reader reader;
            if (object instanceof InputStream) {
                reader = new InputStreamReader((InputStream) object);
            } else {
                reader = (Reader) object;
            }
            char[] chars = new char[8192];
            int i;
            while ((i = reader.read(chars)) != -1) {
                for (int j = 0; j < i; j++) {
                    out.append(chars[j]);
                }
            }
            reader.close();
        } else {
            out.append(toString(object));
        }
    }
1300482
public static Object[] appendArray(Object[] arr, Object obj) {
		Object[] newArr = new Object[arr.length + 1];
		System.arraycopy(arr, 0, newArr, 0, arr.length);
		newArr[arr.length] = obj;
		return newArr;
	}
120478
function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
51666
public boolean add(Object obj) {
        if (obj == null) {
            obj = NULL;
        }

        Entry tab[] = mTable;
        int hash = hashCode(obj);
        int index = (hash & 0x7FFFFFFF) % tab.length;

        for (Entry e = tab[index], prev = null; e != null; e = e.mNext) {
            Object iobj = e.get();
            if (iobj == null) {
                // Clean up after a cleared Reference.
                if (prev != null) {
                    prev.mNext = e.mNext;
                }
                else {
                    tab[index] = e.mNext;
                }
                mCount--;
            }
            else if (e.mHash == hash &&
                     obj.getClass() == iobj.getClass() &&
                     equals(obj, iobj)) {
                // Already in set.
                return false;
            }
            else {
                prev = e;
            }
        }

        if (mCount >= mThreshold) {
            // Cleanup the table if the threshold is exceeded.
            cleanup();
        }

        if (mCount >= mThreshold) {
            // Rehash the table if the threshold is still exceeded.
            rehash();
            tab = mTable;
            index = (hash & 0x7FFFFFFF) % tab.length;
        }

        // Create a new entry.
        tab[index] = new Entry((obj == NULL ? new Null() : obj), hash, tab[index]);
        mCount++;
        return true;
    }
5757
public Binder append(Class<?>[] types, Object... values) {
        return new Binder(this, new Insert(type().parameterCount(), types, values));
    }
609362
public StrBuilder append(final Object obj) {
        if (obj == null) {
            return appendNull();
        }
        if (obj instanceof CharSequence) {
            return append((CharSequence) obj);
        }
        return append(obj.toString());
    }
1309177
@Override
    public final <B extends Data> B toData(Object obj) {
        return toData(obj, globalPartitioningStrategy);
    }
120262
@Override
    public void copyFrom(final CopyFrom obj) {
        final AppModule m = (AppModule) obj;
        setDraft(m.getDraft());
        setEdited(m.getEdited());
    }
663385
public Object put(String key, Object value, Type type) {
		stateMap.put(key, type);
		return super.put(key, value);
	}
876039
public void set(Writable obj) {
    instance = obj;
    Class<? extends Writable> instanceClazz = instance.getClass();
    Class<? extends Writable>[] clazzes = getTypes();
    for (int i = 0; i < clazzes.length; i++) {
      Class<? extends Writable> clazz = clazzes[i];
      if (clazz.equals(instanceClazz)) {
        type = (byte) i;
        return;
      }
    }
    throw new RuntimeException("The type of instance is: "
                               + instance.getClass() + ", which is NOT registered.");
  }
1287328
@SuppressWarnings("unchecked")
	public static <T> T cast(Object obj, Class<T> type){
		if(obj == null){
			return null;
		}
		if(obj.getClass() == type){
			return (T) obj;
		}
		if(isNativeNumberType(obj.getClass()) && isNativeNumberType(type)){
			return castToNativeNumber((Number)obj, type);
		}
		return type.cast(obj);
	}
1191292
@Override
    public void add(final int index, final SyndCategory obj) {
        final SyndCategoryImpl sCat = (SyndCategoryImpl) obj;
        DCSubject subject;
        if (sCat != null) {
            subject = sCat.getSubject();
        } else {
            subject = null;
        }
        subjects.add(index, subject);
    }
809925
public Binder append(Class<?> type, Object value) {
        return new Binder(this, new Insert(type().parameterCount(), new Class[]{type}, value));
    }
188494
public static Data valueOf(final String type, final Object obj) {
        return new Data(type, mimeType(obj), content(obj));
    }
1222617
def append(self, obj):
    
    if isinstance(obj, basestring):
        return self._collection.append(Word(obj))
    else:
        return self._collection.append(obj)
104156
public boolean addObject(String objectType, String id, String content)
    {
        Map<String, Object> container = new HashMap<String, Object>();
        
        if (objectType != null)
        {
            container.put("objectType", objectType);
        }
        if (id != null)
        {
            container.put("id", id);
        }
        if (content != null)
        {
            container.put("content", content);
        }
        
        return addChild("object", container, null);
    }