sealed abstract class Number[T <: Number[T]] extends NetworkElement with Ordered[T] with BasicArithmetic[T]
This abstract class is meant to represent a signed and unsigned number in C This is useful for dealing with codebases/protocols that rely on C's unsigned integer types
- Alphabetic
- By Inheritance
- Number
- BasicArithmetic
- Ordered
- Comparable
- NetworkElement
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def andMask: BigInt
This is used to determine the valid amount of bytes in a number for instance a UInt8 has an andMask of 0xff a UInt32 has an andMask of 0xffffffff
- abstract def apply: (A) => T
Factory function to create the underlying T, for instance a UInt32.
Factory function to create the underlying T, for instance a UInt32. This method must check if the parameter is in the required range.
- abstract def bytes: ByteVector
The byte representation of the NetworkElement
The byte representation of the NetworkElement
- Definition Classes
- NetworkElement
- abstract def isSigned: Boolean
- abstract def underlying: A
The underlying scala number used to to hold the number
The underlying scala number used to to hold the number
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def &(num: T): T
- def *(num: T): T
- Definition Classes
- Number → BasicArithmetic
- def *(factor: BigInt): T
- Definition Classes
- Number → BasicArithmetic
- def +(num: T): T
- Definition Classes
- Number → BasicArithmetic
- def -(num: T): T
- Definition Classes
- Number → BasicArithmetic
- def /(num: T): T
- def <(that: T): Boolean
- Definition Classes
- Ordered
- def <<(num: T): T
- def <<(num: Int): T
- def <=(that: T): Boolean
- Definition Classes
- Ordered
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(that: T): Boolean
- Definition Classes
- Ordered
- def >=(that: T): Boolean
- Definition Classes
- Ordered
- def >>(num: T): T
- def >>(num: Int): T
- def ^(num: Long): T
- def ^(num: T): T
- def addSafe(n: T): Try[T]
Some classes have restrictions on upper bounds for it's underlying value.
Some classes have restrictions on upper bounds for it's underlying value. This might cause the
+
operator to throw. This method wraps it in aTry
block.- Definition Classes
- BasicArithmetic
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def byteSize: Long
The size of the NetworkElement in bytes.
The size of the NetworkElement in bytes.
- Definition Classes
- NetworkElement
- def bytesLE: ByteVector
The byte representation of the NetworkElement in little endian
The byte representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compare(num: T): Int
- Definition Classes
- Number → Ordered
- def compareTo(that: T): Int
- Definition Classes
- Ordered → Comparable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hex: String
The hexadecimal representation of the NetworkElement
The hexadecimal representation of the NetworkElement
- Definition Classes
- NetworkElement
- def hexLE: String
The hexadecimal representation of the NetworkElement in little endian
The hexadecimal representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def multiplySafe(factor: T): Try[T]
Some classes have restrictions on upper bounds for it's underlying value.
Some classes have restrictions on upper bounds for it's underlying value. This might cause the
*
operator to throw. This method wraps it in aTry
block.- Definition Classes
- BasicArithmetic
- def multiplySafe(factor: BigInt): Try[T]
Some classes have restrictions on upper bounds for it's underlying value.
Some classes have restrictions on upper bounds for it's underlying value. This might cause the
*
operator to throw. This method wraps it in aTry
block.- Definition Classes
- BasicArithmetic
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def subtractSafe(n: T): Try[T]
Some classes have restrictions on lower bounds for it's underlying value.
Some classes have restrictions on lower bounds for it's underlying value. This might cause the
-
operator to throw. This method wraps it in aTry
block.- Definition Classes
- BasicArithmetic
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toBigInt: BigInt
- def toByte: Byte
- def toInt: Int
- def toLong: Long
- def toString(): String
- Definition Classes
- AnyRef → Any
- def truncatedBytes: ByteVector
- def unary_-: T
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def xor(num: Long): T
- def xor(num: T): T
- def |(num: T): T