class ClientPermissions {

	public void addPermission(final String secretName, final Permissions permission) {
		synchronized (this.secretPermissions) {
			// Create mask with single value for this permission (if not already set)
			final Integer previous = this.secretPermissions.putIfAbsent(secretName, permission.getCode());

			// We need to update the existing value
			if (previous != null) {
				final Integer updated = (previous | permission.getCode()); // mask the bits with or
				this.secretPermissions.put(secretName, updated);
			}
		}
	}

	public  ClientPermissions();
	public  ClientPermissions(final Map<String, Integer> secretPermissions);

}