Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IntType<FutureType>

An abstract subclass of Comparable to provide a generic interface for integer types that may not be supported by JavaScript

template

FutureType - The type of the subclass with which to restrict all operations to the int class.

inheritdoc

Type parameters

  • FutureType

Hierarchy

Index

Properties

Methods

Properties

Abstract js_int

js_int: number

The JavaScript int type for this integer (with an exception thrown if the value cannot be represented in 32 bits)

Methods

Abstract add

  • add(n: FutureType | number): FutureType
  • Add another integer to the value of this one

    Parameters

    • n: FutureType | number

      The number to add

    Returns FutureType

Abstract cmp

eq

  • eq(n: FutureType | number): boolean
  • Parameters

    • n: FutureType | number

    Returns boolean

    True if this object is equal to the one provided.

gt

  • gt(n: FutureType | number): boolean
  • Parameters

    • n: FutureType | number

    Returns boolean

    True if this object is greater than the one provided.

gteq

  • gteq(n: FutureType | number): boolean
  • Parameters

    • n: FutureType | number

    Returns boolean

    True if this object is greater than or equal to the one provided.

lt

  • lt(n: FutureType | number): boolean
  • Parameters

    • n: FutureType | number

    Returns boolean

    True if this object is less than the one provided.

lteq

  • lteq(n: FutureType | number): boolean
  • Parameters

    • n: FutureType | number

    Returns boolean

    True if this object is less than or equal to the one provided.

Abstract sub

  • sub(n: FutureType | number): FutureType
  • sub(n: FutureType | number): FutureType
  • Add another integer to the value of this one

    Parameters

    • n: FutureType | number

      The number to subtract

    Returns FutureType

  • Assign another integer to this object

    Parameters

    • n: FutureType | number

      The number to assign

    Returns FutureType

Abstract toJSON

  • toJSON(): any

Abstract toString

  • toString(): string

Generated using TypeDoc