compare

open override fun compare(o1: Node?, o2: Node?): Int

Compares its two arguments for order. Returns zero if the arguments are equal, a negative number if the first argument is less than the second, or a positive number if the first argument is greater than the second.

Return

A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Parameters

o1

First object to be compared.

o2

Second object to be compared.