private static Set<ObjectPermission> createPermissions(Collection<String> identifiers,
            Collection<ObjectPermission.Type> types) {

        // Add a permission of each type to the set for each identifier given
        Set<ObjectPermission> permissions = new HashSet<>(identifiers.size());
        types.forEach(type -> {
            identifiers.forEach(identifier -> permissions.add(new ObjectPermission(type, identifier)));
        });

        return permissions;

    }
Creates a new set of ObjectPermissions for each possible combination of
the given identifiers and permission types.

@param identifiers
    The identifiers which should have one ObjectPermission for each of
    the given permission types.

@param types
    The permissions which should be granted for each of the given
    identifiers.

@return
    A new set of ObjectPermissions containing one ObjectPermission for
    each possible combination of the given identifiers and permission
    types.
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleObjectPermissionSet.java