hashmap boolean value is not being updated
<p>I create a <code>HashMap&lt;String, Boolean&gt;</code> when my activity is created...the hashmap contains: </p>

<pre><code>{email=false, username=false, password=false, firmcode=false}
</code></pre>

<p>after the successful response I get from Retrofit call inside <code>onResponse</code> callback I update the value of password key of hashmap to true</p>

<pre><code>inputValidityMap.put(getResources().getString(R.string.password_tag), true);
</code></pre>

<p>the problem is that when I log the hashmap the value of password key has not been updated</p>

<pre><code>if (connectivityObserver.getConnectivityStatus(getActivity()) != AppConfig.NO_CONNECTION) {
     Call&lt;UserConnectionStaff&gt; call = apiService.isPasswordValid(getResources().getString(R.string.passwordValidation), registerPasswordEdt.getText().toString());
     call.enqueue(new Callback&lt;UserConnectionStaff&gt;() {
           @Override
           public void onResponse(Response&lt;UserConnectionStaff&gt; response, Retrofit retrofit) {
              int resource_message = inputValidationCodes.get(response.body().getError_code());
              if (isAdded()) {
                 if (response.body().getError_code() != AppConfig.INPUT_OK) {
                    if (response.body().getError_code() == AppConfig.ERROR_INVALID_INPUT) {
                        passwordErrorTtv.setText(commonElements.decodeUtf8(commonElements.encodeUtf8(getResources().getString(resource_message))));
                    } else 
                        passwordErrorTtv.setText(commonElements.decodeUtf8(commonElements.encodeUtf8(getResources().getString(resource_message))));
                    }
                } else {
                    animationStaff(acceptPasswordRlt, 0.0f, 1.0f, "visible");
                    animationStaff(showHidePasswordTtv, 1.0f, 0.0f, "gone");
                    Log.d(debugTag, inputValidityMap.containsKey(getResources().getString(R.string.password_tag)) + "");
                    inputValidityMap.put(getResources().getString(R.string.password_tag), true);
                }
             }
          }

          @Override
          public void onFailure(Throwable t) {
             if (isAdded()) {
                if (t instanceof IOException) {
                     setToastHelperMsg(getResources().getString(R.string.unavailable_service));
                } else {
                     setToastHelperMsg(getResources().getString(R.string.error_occured));
                }
                registerUsernameEdt.setText(null);
                progressViewActions("stop", usernameProgressView);
             }
          }
     });
} else {
     if ( isAdded() )
          setToastHelperMsg(getResources().getString(R.string.no_connection));
}
Log.d(debugTag, inputValidityMap.toString());
</code></pre>