IComparer

Namespace: TSUI.Collections
Extends: None
Implements: N/A
Exported: Yes
JSDoc status: Complete

Associated source files:

Description

Definition for a Comparer - enables sorting of lists.

Methods

Compare(x: any, y: any): number;
Compares two objects.
  • x : The first object to be compared
  • y : The second object to be compared
  • Returns : the result of the comparison.
    • -1 if x < y;
    • 0 if x === y;
    • 1 if x > y;

Notes:

See ToStringComparer for an example implementation.

Last edited Jun 9, 2013 at 7:36 PM by EdwardNutting, version 14

Comments

No comments yet.