Code example for ArrayList

Methods: addaddAll

0
	public void setAuthentication(final GCAccountStore userAccount) {
		if (TextUtils.isEmpty(userAccount.getPassword())) {
			Log.w(TAG, "Need to place authentication in GCAccount");
		} 
		addHeader("Authorization", "OAuth " + userAccount.getPassword());
		headers.addAll(userAccount.getHeaders());
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see com.chute.sdk.utils.rest.GCRest#getResponse() 
	 */ 
	@Override 
	public String getResponse() {
		return response;
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see com.chute.sdk.utils.rest.GCRest#getErrorMessage() 
	 */ 
	@Override 
	public String getErrorMessage() {
		return message;
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see com.chute.sdk.utils.rest.GCRest#getResponseCode() 
	 */ 
	@Override 
	public int getResponseCode() { 
		return responseCode;
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see com.chute.sdk.utils.rest.GCRest#getHeaders() 
	 */ 
	@Override 
	public ArrayList<NameValuePair> getHeaders() {
		return headers;
	} 
 
	public GCBaseRestClient() { 
		headers = new ArrayList<NameValuePair>();
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see com.chute.sdk.utils.rest.GCRest#addHeader(java.lang.String, 
	 * java.lang.String) 
	 */ 
	@Override 
	public void addHeader(final String name, final String value) {
		if (TextUtils.isEmpty(value) == false) {
			headers.add(new BasicNameValuePair(name, value));
		} 
	} 
 
	/* 
	 * (non-Javadoc)