org.snmp4j.agent

Class MOScopeComparator

    • Constructor Detail

      • MOScopeComparator

        public MOScopeComparator()
    • Method Detail

      • compare

        public int compare(MOScope o1,
                  MOScope o2)
        Compares a scope with another scope or query. See also the class description how comparison is done.
        Specified by:
        compare in interface Comparator<MOScope>
        Parameters:
        o1 - a MOscope instance.
        o2 - a MOscope instance.
        Returns:
        an integer less than zero if o1 is less than o2 and zero if both values are deemed to be equal and a value greater than zero if o1 is greater than o2.
      • isQueryContextMatching

        public static boolean isQueryContextMatching(MOQuery a,
                                     MOScope b)
        Indicates whether the given query's context matches the context of the given scope.
        Parameters:
        a - a MOQuery instance.
        b - another MOScope instance.
        Returns:
        true if the query's context is null or if both contexts match or if the context of scope is the empty string.
        Since:
        2.0.2
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
Copyright 2005-2016 Frank Fock (SNMP4J.org)

Copyright © 2016 SNMP4J.org. All rights reserved.