Skip to content

Instantly share code, notes, and snippets.

@darussian
Created May 22, 2014 20:54
Show Gist options
  • Save darussian/3dfe4a31495caa6b3c0a to your computer and use it in GitHub Desktop.
Save darussian/3dfe4a31495caa6b3c0a to your computer and use it in GitHub Desktop.
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
/**
* Created by Dmitriy on 5/22/2014.
*/
public class CustomNameValuePair extends BasicNameValuePair {
public CustomNameValuePair(String name, String value) {
super(name, value);
}
@Override
public boolean equals(Object object) {
if (object instanceof String) {
return getName().equals(object.toString());
}
return super.equals(object);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment