package org.snmp4j.agent;

import org.snmp4j.smi.OID;
import org.snmp4j.smi.OctetString;

/* JADX INFO: loaded from: classes.dex */
public class DefaultMOQuery implements MOQuery {
    private MOContextScope scope;
    private Object source;
    private boolean writeAccessQuery;

    public DefaultMOQuery(MOContextScope mOContextScope) {
        this.scope = mOContextScope;
    }

    @Override // org.snmp4j.agent.MOScope
    public boolean covers(OID oid) {
        return this.scope.covers(oid);
    }

    @Override // org.snmp4j.agent.MOContextScope
    public OctetString getContext() {
        return this.scope.getContext();
    }

    @Override // org.snmp4j.agent.MOScope
    public OID getLowerBound() {
        return this.scope.getLowerBound();
    }

    @Override // org.snmp4j.agent.MOQuery
    public MOContextScope getScope() {
        return this.scope;
    }

    public Object getSource() {
        return this.source;
    }

    @Override // org.snmp4j.agent.MOScope
    public OID getUpperBound() {
        return this.scope.getUpperBound();
    }

    @Override // org.snmp4j.agent.MOScope
    public boolean isCovered(MOScope mOScope) {
        return this.scope.isCovered(mOScope);
    }

    @Override // org.snmp4j.agent.MOScope
    public boolean isLowerIncluded() {
        return this.scope.isLowerIncluded();
    }

    @Override // org.snmp4j.agent.MOScope
    public boolean isOverlapping(MOScope mOScope) {
        return this.scope.isOverlapping(mOScope);
    }

    @Override // org.snmp4j.agent.MOScope
    public boolean isUpperIncluded() {
        return this.scope.isUpperIncluded();
    }

    @Override // org.snmp4j.agent.MOQuery
    public boolean isWriteAccessQuery() {
        return this.writeAccessQuery;
    }

    @Override // org.snmp4j.agent.MOQuery
    public boolean matchesQuery(ManagedObject managedObject) {
        return true;
    }

    @Override // org.snmp4j.agent.MOQuery
    public void substractScope(MOScope mOScope) {
        MOContextScope mOContextScope = this.scope;
        if (!(mOContextScope instanceof MutableMOScope)) {
            throw new UnsupportedOperationException();
        }
        ((MutableMOScope) mOContextScope).substractScope(mOScope);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getName());
        sb.append("[");
        sb.append(getScope().getContext());
        sb.append("]=");
        sb.append(getScope().getLowerBound());
        sb.append("<");
        sb.append(getScope().isLowerIncluded() ? "=" : "");
        sb.append(" x <");
        sb.append(getScope().isUpperIncluded() ? "=" : "");
        sb.append(getScope().getUpperBound());
        return sb.toString();
    }

    public DefaultMOQuery(MOContextScope mOContextScope, boolean z) {
        this(mOContextScope);
        this.writeAccessQuery = z;
    }

    public DefaultMOQuery(MOContextScope mOContextScope, boolean z, Object obj) {
        this(mOContextScope, z);
        this.source = obj;
    }
}
