All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.edu.icm.unity.oauth.client.AttributeFetchResult Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2017 Bixbit - Krzysztof Benedyczak All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package pl.edu.icm.unity.oauth.client;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AttributeFetchResult
{
	private Map> attributes;
	private Map rawAttributes;
	
	public AttributeFetchResult(Map> attributes,
			Map rawAttributes)
	{
		this.attributes = new HashMap<>(attributes);
		this.rawAttributes = new HashMap<>(rawAttributes);
	}
	
	public AttributeFetchResult()
	{
		attributes = new HashMap<>();
		rawAttributes = new HashMap<>();
	}

	public AttributeFetchResult mergeWith(AttributeFetchResult other)
	{
		Map> attributes = new HashMap<>(this.attributes);
		Map rawAttributes = new HashMap<>(this.rawAttributes);
		attributes.putAll(other.getAttributes());
		rawAttributes.putAll(other.getRawAttributes());
		return new AttributeFetchResult(attributes, rawAttributes);
	}
	
	public Map> getAttributes()
	{
		return attributes;
	}

	public Map getRawAttributes()
	{
		return rawAttributes;
	}

	@Override
	public String toString()
	{
		return "AttributeFetchResult [attributes=" + attributes + ", rawAttributes=" + rawAttributes + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy