I have an overrriden method like this
@Override
public Build auth (Map.Entry<String, String> auth) {
this.mAuth = auth;
return this;
}
Here am trying to call this method in the following way
Map<String, String> authentication = new HashMap<String , String> ();
authentication.put("username" , "testname");
authentication.put("password" , "testpassword");
Map.Entry<String, String> authInfo =(Entry<String , String>) authentication.entrySet();
AuthMethod.auth(authInfo)
While running this am getting
java.lang.ClassCastException: java.util.HashMap$EntrySet cannot be cast to java.util.Map$Entry
How can i pass Map.Entry<String, String> to auth method
Map.Entry<String, String>as a parameter instead of just two strings...)