/*
 * Decompiled with CFR 0.152.
 */
package org.jivesoftware.smack.filter;

import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;

public class ToFilter
implements StanzaFilter {
    private final Jid to;

    public ToFilter(Jid to) {
        this.to = to;
    }

    @Override
    public boolean accept(Stanza packet) {
        Jid packetTo = packet.getTo();
        if (packetTo == null) {
            return false;
        }
        return packetTo.equals(this.to);
    }

    public String toString() {
        return this.getClass().getSimpleName() + ": to=" + this.to;
    }
}
