Code example for ImmutableSet.Builder

Methods: add, build

0
public class CloudIdentityAuthenticationModule extends KeystoneAuthenticationModule { 
 
   @Override 
   protected Map<String, Function<Credentials, Access>> authenticationMethods(Injector i) { 
      Builder<Function<Credentials, Access>> fns = ImmutableSet.<Function<Credentials, Access>> builder(); 
      fns.add(i.getInstance(AuthenticatePasswordCredentials.class)); 
      fns.add(i.getInstance(AuthenticateApiKeyCredentials.class)); 
      return CredentialTypes.indexByCredentialType(fns.build()); 
   } 
 
}