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

com.urbanairship.api.push.model.notification.mpns.MPNSTileData Maven / Gradle / Ivy

There is a newer version: 9.5.0
Show newest version
/*
 * Copyright (c) 2013-2016.  Urban Airship and Contributors
 */

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

import com.google.common.base.Optional;

public abstract class MPNSTileData
{
    private final Optional id;
    private final Optional title;
    private final Optional count;

    protected MPNSTileData(Optional id, Optional title, Optional count) {
        this.id = id;
        this.title = title;
        this.count = count;
    }

    public Optional getTitle() {
        return this.title;
    }

    public Optional getId() {
        return this.id;
    }

    public Optional getCount() {
        return this.count;
    }

    public abstract String getTemplate();

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

        MPNSTileData that = (MPNSTileData)o;
        if (id != null ? !id.equals(that.id) : that.id != null) {
            return false;
        }
        if (title != null ? !title.equals(that.title) : that.title != null) {
            return false;
        }
        if (count != null ? !count.equals(that.count) : that.count != null) {
            return false;
        }
        return true;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy