private static String addKey(List<Optional<AccountSshKey>> keys,String pub){
  AccountSshKey.Id keyId=new AccountSshKey.Id(new Account.Id(1),keys.size() + 1);
  AccountSshKey key=new AccountSshKey(keyId,pub);
  keys.add(Optional.of(key));
  return key.getSshPublicKey() + "\n";
}

private static String addKey ( List < Optional < AccountSshKey > > keys , String pub ) { AccountSshKey . Id keyId = new AccountSshKey . Id ( new Account . Id ( 1 ) , keys . size ( ) + 1 ) ; AccountSshKey key = new AccountSshKey ( keyId , pub ) ; keys . add ( Optional . of ( key ) ) ; return key . getSshPublicKey ( ) + "\n" ; }
adds the given public key as new ssh key to the given list .
