private static < T > boolean containsIdentity ( List < T > list , T object ) { for ( T item : list ) { if ( item == object ) { return true ; } } return false ; }
Searches for an item in a list using reference equality .