adds a value and return this array

@param o
@return this Array
484430
@Override
    public boolean add(Object o) {
	if (offset + size + 1 > arr.length) enlargeCapacity(size + 1);
	arr[offset + size] = o;
	size++;
	return true;
    }
68221
public boolean add(Object o) {
        if (o instanceof GroupAttrReply == false) {
            return true;
        }
        GroupAttrReply gcr = (GroupAttrReply)o;
        if (gcr.has_failed) {
            has_failed = true;
        }
        return super.add(o);
    }
368985
public static String[] add(final String[] a, final String element) {
        if (N.isNullOrEmpty(a)) {
            return N.asArray(element);
        }

        final String[] newArray = new String[a.length + 1];

        copy(a, 0, newArray, 0, a.length);
        newArray[a.length] = element;

        return newArray;
    }
1046585
void add(Scalar o)
    {
        if (!type.equals(o.type))
        {
            throw new UnsupportedOperationException("Action with wrong kind of class");
        }
        value += o.value;
    }
846648
public int addValue(byte[] array) {
        int val = hashCode();
        for (byte i : array) {
            val = addValue(i);
        }
        return val;
    }
767473
public static GraphRole[] toGRoArray(Object[] o) {
        GraphRole[] result = new GraphRole[o.length];
        System.arraycopy(o, 0, result, 0, o.length);
        return result;
    }
682388
public static Object copy(Object o)
	{
		if (o instanceof java.io.Serializable)
		{
			try
			{
				ByteArrayOutputStream bs = new ByteArrayOutputStream(128);
				ObjectOutputStream dos = new ObjectOutputStream(bs);
				dos.writeObject(o);
				ByteArrayInputStream is = new ByteArrayInputStream(bs.toByteArray());
				ObjectInputStream ios = new ObjectInputStream(is);
				Object copy = ios.readObject();
				return copy;

			}
			catch (IOException e)
			{
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			catch (ClassNotFoundException e)
			{
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}

		return null;
	}
254313
@Override
    public final byte[] toBytes(Object o)
    {

        try
        {
            if (o != null)
            {
                if (o instanceof byte[])
                {
                    return (byte[]) o;
                }

                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                ObjectOutputStream oos = new ObjectOutputStream(baos);
                oos.writeObject(o);
                oos.close();
                return baos.toByteArray();
            }
        }
        catch (IOException e)
        {
            log.error("IO exception, Caused by {}.", e);
            throw new PropertyAccessException(e);
        }
        return null;
    }
402963
function copyOf(o) {
  if (Array.isArray(o)) return o.slice();
  if (isObject(o)) return assign({}, o);
  return o;
}
1070332
public static GraphEntity[] toGEArray(Object[] o) {
        GraphEntity[] result = new GraphEntity[o.length];
        System.arraycopy(o, 0, result, 0, o.length);
        return result;
    }
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);

    }
722420
public static GraphRelationship[] toGRArray(Object[] o) {
        GraphRelationship[] result = new GraphRelationship[o.length];
        System.arraycopy(o, 0, result, 0, o.length);
        return result;
    }
901113
public static Object setEL(Object o, int index, Object value) {
	try {
	    return set(o, index, value);
	}
	catch (ArrayUtilException e) {
	    return null;
	}
    }
596097
public boolean add(Object o) {
        if (o instanceof GroupCmdReply == false) {
            return true;
        }
        GroupCmdReply gcr = (GroupCmdReply)o;
        if (gcr.has_failed) {
            has_failed = true;
        }
        return super.add(o);
    }
1272134
public int getCount(Object o) {
    int[] nums = (int[]) cset.get(o);   
    if (nums == null ) {
      return(0);
    }
    else {
      return(nums[0]);
    }
  }
769946
public static JsonValue serializeAsJson(Object o) throws IOException {
        try {
            return findFieldsToSerialize(o).mainObject;
        } catch (IllegalStateException ise) {
            // the reflective attempt to build the object failed.
            throw new IOException("Unable to build JSON for Object", ise);
        } catch (JsonException e) {
            throw new IOException("Unable to build JSON for Object", e);
        }
    }
512908
public static Object get(Object o, int index, Object defaultValue) {
	if (index < 0) return null;
	if (o instanceof Object[]) {
	    Object[] arr = ((Object[]) o);
	    if (arr.length > index) return arr[index];
	}
	else if (o instanceof boolean[]) {
	    boolean[] arr = ((boolean[]) o);
	    if (arr.length > index) return arr[index] ? Boolean.TRUE : Boolean.FALSE;
	}
	else if (o instanceof byte[]) {
	    byte[] arr = ((byte[]) o);
	    if (arr.length > index) return new Byte(arr[index]);
	}
	else if (o instanceof char[]) {
	    char[] arr = ((char[]) o);
	    if (arr.length > index) return "" + (arr[index]);
	}
	else if (o instanceof short[]) {
	    short[] arr = ((short[]) o);
	    if (arr.length > index) return Short.valueOf(arr[index]);
	}
	else if (o instanceof int[]) {
	    int[] arr = ((int[]) o);
	    if (arr.length > index) return Integer.valueOf(arr[index]);
	}
	else if (o instanceof long[]) {
	    long[] arr = ((long[]) o);
	    if (arr.length > index) return Long.valueOf(arr[index]);
	}
	else if (o instanceof float[]) {
	    float[] arr = ((float[]) o);
	    if (arr.length > index) return new Float(arr[index]);
	}
	else if (o instanceof double[]) {
	    double[] arr = ((double[]) o);
	    if (arr.length > index) return new Double(arr[index]);
	}
	return defaultValue;
    }

    /**
     * sets a value to a array at defined index
     * 
     * @param o
     * @param index
     * @param value
     * @return value setted
     * @throws ArrayUtilException
     */
    public static Object set(Object o, int index, Object value) throws ArrayUtilException {
	if (index < 0) throw invalidIndex(index, 0);
	if (o instanceof Object[]) {
	    Object[] arr = ((Object[]) o);
	    if (arr.length > index) return arr[index] = value;
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof boolean[]) {
	    boolean[] arr = ((boolean[]) o);
	    if (arr.length > index) {
		arr[index] = Caster.toBooleanValue(value, false);
		return arr[index] ? Boolean.TRUE : Boolean.FALSE;
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof byte[]) {
	    byte[] arr = ((byte[]) o);
	    if (arr.length > index) {
		double v = Caster.toDoubleValue(value, true, Double.NaN);
		if (Decision.isValid(v)) {
		    return new Byte(arr[index] = (byte) v);
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof short[]) {
	    short[] arr = ((short[]) o);
	    if (arr.length > index) {
		double v = Caster.toDoubleValue(value, true, Double.NaN);
		if (Decision.isValid(v)) {
		    return Short.valueOf(arr[index] = (short) v);
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof int[]) {
	    int[] arr = ((int[]) o);
	    if (arr.length > index) {
		double v = Caster.toDoubleValue(value, true, Double.NaN);
		if (Decision.isValid(v)) {
		    return Integer.valueOf(arr[index] = (int) v);
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof long[]) {
	    long[] arr = ((long[]) o);
	    if (arr.length > index) {
		double v = Caster.toDoubleValue(value, true, Double.NaN);
		if (Decision.isValid(v)) {
		    return Long.valueOf(arr[index] = (long) v);
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof float[]) {
	    float[] arr = ((float[]) o);
	    if (arr.length > index) {
		double v = Caster.toDoubleValue(value, true, Double.NaN);
		if (Decision.isValid(v)) {
		    return new Float(arr[index] = (float) v);
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof double[]) {
	    double[] arr = ((double[]) o);
	    if (arr.length > index) {
		double v = Caster.toDoubleValue(value, true, Double.NaN);
		if (Decision.isValid(v)) {
		    return new Double(arr[index] = v);
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	else if (o instanceof char[]) {
	    char[] arr = ((char[]) o);
	    if (arr.length > index) {
		String str = Caster.toString(value, null);
		if (str != null && str.length() > 0) {
		    char c = str.charAt(0);
		    arr[index] = c;
		    return str;
		}
	    }
	    throw invalidIndex(index, arr.length);
	}
	throw new ArrayUtilException("Object [" + Caster.toClassName(o) + "] is not a Array");
    }