public Object replaceObjectAtIndex(Object object, int index) { if (object == null) throw new IllegalArgumentException("Attempt to insert null into an  " + getClass().getName() + "."); if (index >= 0 && index < _count) { Object result = _objects[index]; _objects[index] = object; clearCache(); return result; } else { throw new IllegalArgumentException("Index (" + index + ") out of bounds [0, " + (_count - 1) + "]"); }
public void replaceObjectAtIndex(int index, Object object) { replaceObjectAtIndex(object, index);
    public Object replaceObjectAtIndex(Object object, int index) {        if (object == null)            throw new IllegalArgumentException("Attempt to insert null into an  " + getClass().getName() + ".");        if (index >= 0 && index < _count) {            Object result = _objects[index];            _objects[index] = object;            clearCache();            return result;        } else {            throw new IllegalArgumentException("Index (" + index + ") out of bounds [0, " + (_count - 1) + "]");        }    }