I am attempting to check if a list of long's does not contain a certain value. It would seem as though that condition is never met, even though I know that one value does not exist in a certain linked list...
for(int i : organizationIDs){
if(!ListOfOrgIds.contains(Long.valueOf(i))){
addThese.add(new Long(i));
}
}
I am essentially looking for value that doesn't exist in the orgID's array, if it doesn't exist, add it to the addThese
linked list... Am I missing some nuance with Long's that I should know?
ListOfOrgIds as found in the debugger
14057
821
18021
OrganizationIDs as found in the debugger
821
14057
18021
Let me just put it this way, I am looking right at the debugger, and it is telling me that
ListOfOrgIds.contains(i)
is false... which is patently untrue...
To be specific, look at the the values of ListOfOrgs...
821 is indeed in there. Why am I getting a false on the contains call?