Microsoft SDK for Java

IComparer.compare

Compares two objects.

Syntax

public int compare( Object x, Object y )

Parameters

x

The first object to compare.

y

The object to compare with the first object.

Return Value

An implementation of this method must return a value less than zero if x is less than y, a value greater than zero if x is greater than y, or zero if x is equal to y.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.