public Friend getFriend ( Filter < Friend > filter ) { for ( final RosterEntry e : connection . getRoster ( ) . getEntries ( ) ) { final Friend f = new Friend ( this , connection , e ) ; if ( filter . accept ( f ) ) { return f ; } } return null ; }
Gets a friend based on a given filter .