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.4.2
Show newest version
/*
 * Copyright (c) 2013-2016.  Urban Airship and Contributors
 */

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

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

public class NotificationPayloadOverrideKey {

    private final DeviceType deviceType;
    private final Class clazz;

    public NotificationPayloadOverrideKey(DeviceType deviceType, Class clazz) {
        this.deviceType = deviceType;
        this.clazz = clazz;
    }

    public DeviceType getDeviceType() {
        return deviceType;
    }

    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;
        }

        return deviceType == that.deviceType;

    }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy