public DialerCall getCallWithState(int state, int positionToFind) {
    DialerCall retval = null;
    int position = 0;
    for (DialerCall call : callById.values()) {
      if (call.getState() == state) {
        if (position >= positionToFind) {
          retval = call;
          break;
        } else {
          position++;
        }
      }
    }
    return retval;
  }
public DialerCall getCallWithState(int state, int positionToFind) {
    DialerCall retval = null;
    int position = 0;
    for (DialerCall call : callById.values()) {
      if (call.getState() == state) {
        if (position >= positionToFind) {
          retval = call;
          break;
        } else {
          position++;
        }
      }
    }
    return retval;
  }
public dialercall getcallwithstate(int state, int positiontofind) { dialercall retval = null; int position = 0; for (dialercall call : callbyid.values()) { if (call.getstate() == state) { if (position >= positiontofind) { retval = call; break; } else { position++; } } } return retval; }