class ImmutableAccessControlList implements AccessControlList {

    @Override
    public AccessControlList merge(final AclEntry entry) {
        checkNotNull(entry, "ACL entry to be added");

        final AuthorizationSubject authSubject = entry.getAuthorizationSubject();
        final Permissions permissions = getPermissionsOf(authSubject);
        permissions.addAll(entry.getPermissions());

        final Map<AuthorizationSubject, AclEntry> entriesCopy = copyEntries();
        entriesCopy.put(authSubject, AccessControlListModelFactory.newAclEntry(authSubject, permissions));

        return new ImmutableAccessControlList(entriesCopy);
    }

    private  ImmutableAccessControlList(final Map<AuthorizationSubject, AclEntry> theEntries);
    private  ImmutableAccessControlList(final Collection<AclEntry> theEntries);

}