Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractIPNum

Provides the implementation of functionality that are common to IPv4, IPv6, IPv4Mask and IPv6Mask

Hierarchy

Index

Properties

Abstract bitSize

bitSize: number

The number of bits needed to represents the value of the IP number

Abstract maximumBitSize

maximumBitSize: BigInteger

The maximum bit size (i.e. binary value) of the IP number in BigInteger

Abstract value

value: BigInteger

The decimal value represented by the IP number in BigInteger

Methods

getValue

  • getValue(): BigInteger
  • Gets the numeric value of an IP number as {@link BigInteger}

    Returns BigInteger

    the numeric value of an IP number.

hasNext

  • hasNext(): boolean
  • Checks if an IP number has a value greater than the present value

    Returns boolean

    true, if there is a value greater than the present value. Returns false otherwise.

hasPrevious

  • hasPrevious(): boolean
  • Checks if an IP number has a value lesser than the present value

    Returns boolean

    true, if there is a value lesser than the present value. Returns false otherwise.

isEquals

  • Checks if the given IP number, is equals to the current IP number

    Parameters

    • anotherIPNum: AbstractIPNum

      the other IP number to compare with

    Returns boolean

    true if the given IP number is equals

isGreaterThan

  • Checks if the given IP number is greater than this current IP number

    Parameters

    • anotherIPNum: AbstractIPNum

      the other IP number to compare with

    Returns boolean

    true if the given IP number is greater than this current one. False otherwise.

isGreaterThanOrEquals

  • Checks if the given IP number is greater than or equals to this current IP number

    Parameters

    • anotherIPNum: AbstractIPNum

      the other IP number to compare with

    Returns boolean

    {boolean} true if the given IP number is greater than or equals to this current one. False otherwise.

isLessThan

  • Checks if the given IP number is lesser than this current IP number

    Parameters

    • anotherIPNum: AbstractIPNum

      the other IP number to compare with

    Returns boolean

    true if the given IP number is less than this current one. False otherwise.

isLessThanOrEquals

  • Checks if the given IP number is less than or equals to this current IP number

    Parameters

    • anotherIPNum: AbstractIPNum

      the other IP number to compare with

    Returns boolean

    true if the given IP number is less than or equals to this current one. False otherwise.

Abstract nextIPNumber

Abstract previousIPNumber

toBinaryString

  • toBinaryString(): string
  • Gets the binary string representation of an IP number.

    Returns string

    the string binary representation.

Generated using TypeDoc