java.lang.Object
org.snmp4j.agent.MOScopeComparator
org.snmp4j.agent.util.MOScopePriorityComparator
- All Implemented Interfaces:
Comparator<MOScope>
The
MOScopePriorityComparator
applies a sorting on a list of MOScope
instances
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 by
MOScopeComparator
.- Since:
- 3.5.0
- Version:
- 3.5.0
- Author:
- Frank Fock
-
Constructor Summary
ConstructorDescriptionMOScopePriorityComparator
(SortedMap<org.snmp4j.smi.OID, Integer> priorityMap) -
Method Summary
Methods inherited from class org.snmp4j.agent.MOScopeComparator
equals, hashCode, isQueryContextMatching
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
MOScopePriorityComparator
-
-
Method Details
-
compare
Description copied from class:MOScopeComparator
Compares a scope with another scope or query. See also the class description how comparison is done.- Specified by:
compare
in interfaceComparator<MOScope>
- Overrides:
compare
in classMOScopeComparator
- Parameters:
o1
- a MOScope instance.o2
- a MOScope instance.- Returns:
- an integer less than zero if
o1
is less thano2
and zero if both values are deemed to be equal and a value greater than zero ifo1
is greater thano2
.
-