public E getById ( String id ) { if ( id == null ) { for ( E element : this ) { if ( element != null && element . getId ( ) == null ) { return element ; } } } else { for ( E element : this ) { if ( element != null && id . equals ( element . getId ( ) ) ) { return element ; } } } return null ; }
Returns the first element in this list with a matching identifier