code: private Privilege[] privileges( Set<String> names ) throws ValueFormatException, AccessControlException, RepositoryException {
          Privilege[] privileges = new Privilege[names.size()];
          int i = 0;
          for (String name : names) {
              privileges[i++] = privilegeFromName(name);
          }
          return privileges;
      }
docs: Constructs list of Privilege objects using privilege's name.
  
  @param names names of privileges
  @return Privilege objects.
  @throws ValueFormatException
  @throws AccessControlException
  @throws RepositoryException