/** * Find index of given {@link RawContacts#_ID} when present. */ public int indexOfRawContactId(Long rawContactId) { if (rawContactId == null) return -1; final int size = this.size(); for (int i = 0; i < size; i++) { final Long currentId = getRawContactId(i); if (rawContactId.equals(currentId)) { return i; } } return -1; }