compare abstract method

int compare(
  1. T a,
  2. T b
)

Compares two values of type T for order.

Returns:

  • A negative number if a < b
  • 0 if a == b
  • A positive number if a > b

This method must be implemented by subclasses or factory constructors.

Implementation

int compare(T a, T b);