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

com.urbanairship.api.push.model.notification.NotificationPayloadOverrideKey Maven / Gradle / Ivy

There is a newer version: 9.7.0
Show newest version
/*
 * Copyright 2013 Urban Airship and Contributors
 */

package com.urbanairship.api.push.model.notification;

import com.urbanairship.api.push.model.Platform;

public class NotificationPayloadOverrideKey {

    private final Platform platform;
    private final Class clazz;

    public NotificationPayloadOverrideKey(Platform platform, Class clazz) {
        this.platform = platform;
        this.clazz = clazz;
    }

    public Platform getPlatform() {
        return platform;
    }

    public Class getOverrideClass() {
        return clazz;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        NotificationPayloadOverrideKey that = (NotificationPayloadOverrideKey) o;

        if (clazz != null ? !clazz.equals(that.clazz) : that.clazz != null) {
            return false;
        }
        if (platform != that.platform) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = platform != null ? platform.hashCode() : 0;
        result = 31 * result + (clazz != null ? clazz.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "NotificationPayloadOverrideKey{" +
                "platform=" + platform +
                ", clazz=" + clazz +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy