Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Hexadecatet

A base 16 (hexadecimal) representation of a 16 bit value.

It consists of four (base 16) number. ie FFFF

It is used to represents the components of an IPv6 address

Hierarchy

  • Hexadecatet

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Hexadecatet(givenValue: string | number): Hexadecatet
  • Constructor for creating an instance of Hexadecatet

    Parameters

    • givenValue: string | number

      a string or numeric value. If given value is a string then it should be a four (base 16) number representation of a 16bit value. If it is a number, then it should be a decimal number representation of a 16 bit value

    Returns Hexadecatet

Properties

Private value

value: number

Methods

getValue

  • getValue(): number
  • Returns the numeric value in base 10 (ie decimal)

    Returns number

    the numeric value in base 10 (ie decimal)

toString

  • toString(): string
  • Returns the string representation of the base 16 representation of the value

    Returns string

    the string representation of the base 16 representation of the value

Static fromNumber

  • A convenience method for constructing an instance of Hexadecatet from a decimal number representation of a 16 bit value

    Parameters

    • rawValue: number

      decimal number representation of a 16 bit value

    Returns Hexadecatet

    an instance of Hexadecatet

Static fromString

  • A convenience method for constructing an instance of Hexadecatet from a four (base 16) number representation of a 16bit value.

    Parameters

    • rawValue: string

      the four (base 16) number

    Returns Hexadecatet

    an instance of Hexadecatet

Generated using TypeDoc