title: Unchecked/unconfirmed cast
body: <p>i am having unchecked/unconfirmed cast issue in my code. can it be solved without type casting or any other solution is there then please suggest. thanks.</p>
  
  <p>here is my code-</p>
  
  <pre><code>public OnClickListener getLblSelectUnSelectMenuListener() {
          return new OnClickListener() {
              @Override
              public void onClick(View v) {
                  TextView text = (TextView) v;
                  if (!text.getText().equals("")) {
                      if (getPreviouslySelected().isChecked()) {
                          checkOrUnCheckSelectedItem(false);
  
                      } else {
                          checkOrUnCheckSelectedItem(true);
                      }
                  }
  
  
              }
          };
      }
  </code></pre>