- java.lang.Object
-
- org.snmp4j.agent.MOScopeComparator
-
- org.snmp4j.agent.util.MOScopePriorityComparator
-
- All Implemented Interfaces:
Comparator<MOScope>
public class MOScopePriorityComparator extends MOScopeComparator
TheMOScopePriorityComparatorapplies a sorting on a list ofMOScopeinstances defined by a priority list. For instances where no priority is set by the priority list, this iterator will return them after the other items in default order defined byMOScopeComparator.- Since:
- 3.5.0
- Version:
- 3.5.0
- Author:
- Frank Fock
-
-
Constructor Summary
Constructors Constructor Description MOScopePriorityComparator(SortedMap<org.snmp4j.smi.OID,Integer> priorityMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(MOScope o1, MOScope o2)Compares a scope with another scope or query.-
Methods inherited from interface java.util.Comparator
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from class org.snmp4j.agent.MOScopeComparator
equals, hashCode, isQueryContextMatching
-
-
-
-
Method Detail
-
compare
public int compare(MOScope o1, MOScope o2)
Description copied from class:MOScopeComparatorCompares a scope with another scope or query. See also the class description how comparison is done.- Specified by:
comparein interfaceComparator<MOScope>- Overrides:
comparein classMOScopeComparator- Parameters:
o1- a MOScope instance.o2- a MOScope instance.- Returns:
- an integer less than zero if
o1is less thano2and zero if both values are deemed to be equal and a value greater than zero ifo1is greater thano2.
-
-