public List < Server > getEligibleServers ( List < Server > servers , Object loadBalancerKey ) { if ( loadBalancerKey == null ) { return ImmutableList . copyOf ( Iterables . filter ( servers , this . getServerOnlyPredicate ( ) ) ) ; } else { List < Server > results = Lists . newArrayList ( ) ; for ( Server server : servers ) { if ( this . apply ( new PredicateKey ( loadBalancerKey , server ) ) ) { results . add ( server ) ; } } return results ; } }
Get servers filtered by this predicate from list of servers .