Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IComparable<T>

Supports comparisons between objects.

interface

Type parameters

  • T

Hierarchy

Index

Methods

compareTo

  • compareTo(other: T): number
  • Compare another object to this one.

    Parameters

    • other: T

      The object to compare to this one.

    Returns number

    -1: less than the other object; 0 equivalent to the other object; 1 greater than the other object.

equals

  • equals(other: T): boolean
  • Check is this object is equal to another.

    Parameters

    • other: T

      The object to compare to this one.

    Returns boolean

    true if the objects are equivalent, false otherwise.

Generated using TypeDoc