public List < Friend > getFriends ( Filter < Friend > filter ) { final ArrayList < Friend > friends = new ArrayList <> ( ) ; for ( final RosterEntry e : connection . getRoster ( ) . getEntries ( ) ) { final Friend f = new Friend ( this , connection , e ) ; if ( filter . accept ( f ) ) { friends . add ( f ) ; } } return friends ; }
Gets a list of your friends based on a given filter .