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

com.adjust.sdk.SessionParameters Maven / Gradle / Ivy

There is a newer version: 4.38.5
Show newest version
package com.adjust.sdk;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamField;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by pfms on 29/07/2016.
 */
public class SessionParameters {
    Map callbackParameters;
    Map partnerParameters;

    @Override
    public boolean equals(Object other) {
        if (other == this) return true;
        if (other == null) return false;
        if (getClass() != other.getClass()) return false;
        SessionParameters otherSessionParameters = (SessionParameters) other;

        if (!Util.equalObject(callbackParameters, otherSessionParameters.callbackParameters)) return false;
        if (!Util.equalObject(partnerParameters, otherSessionParameters.partnerParameters)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int hashCode = 17;
        hashCode = 37 * hashCode + Util.hashObject(callbackParameters);
        hashCode = 37 * hashCode + Util.hashObject(partnerParameters);
        return hashCode;
    }

    public SessionParameters deepCopy() {
        SessionParameters newSessionParameters = new SessionParameters();
        if (this.callbackParameters != null) {
            newSessionParameters.callbackParameters = new HashMap(this.callbackParameters);
        }
        if (this.partnerParameters != null) {
            newSessionParameters.partnerParameters = new HashMap(this.partnerParameters);
        }
        return newSessionParameters;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy