pl.edu.icm.unity.oauth.client.AttributeFetchResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unity-server-oauth Show documentation
Show all versions of unity-server-oauth Show documentation
Client and server OAuth support
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