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

inheritdoc

Type parameters

  • FutureType

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

Hierarchy

Index

Properties

Abstract i

i: FutureType

Get an immutable version of this int.

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 assign

  • assign(n: FutureType | number): FutureType
  • Assign another integer to this object

    Parameters

    • n: FutureType | number

      The number to assign

    Returns FutureType

Abstract cmp

Abstract copy

  • copy(): FutureType
  • Create an identical clone of this int

    Returns FutureType

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
  • Add another integer to the value of this one

    Parameters

    • n: FutureType | number

      The number to subtract

    Returns FutureType

Abstract toJSON

  • toJSON(): any

Abstract toString

  • toString(): string

Generated using TypeDoc