com.apamax.containers
Event HeapIntegerComparator


A comparator for a heap containing integers.
Member summary
 booleanincreasing

True for a min-heap, false for a max-heap.
 
Action summary
 integercompare(any a, any b)

Compare two integers.
 
Member detail

increasing

boolean increasing
True for a min-heap, false for a max-heap.
Action detail

compare

integer compare(any a, any b)
Compare two integers.
Parameters:
a - The first integer to compare.
b - The second integer to compare.
Returns:
Positive if increasing and a > b, or not increasing and a < b, 0 if equal and negative otherwise.