Integer8

Summary

The wrapper class for the signed byte primitive type.

Description

The System.Integer8 class represents 8-bit signed integers. The System.Integer8 class is the wrapper class for the signed byte primitive type.

The range for 8-bit signed integers is [ -128, 127 ] (inclusive).

Examples

Instantiation
1
2
3
import System;
 
System.Integer8 x = new System.Integer8(100);
Auto-boxing
1
2
3
import System;
 
System.Integer8 x = 100;
Primitives Only
1
2
signed byte x = 1;
signed byte y = 2;

Methods

  • compare

    Compares the Integer8 object to another Integer8 object.

  • fromString

    Converts a string to an signed byte value.

  • fromStringOr

    Converts a string to its equivalent signed byte value or the provided default value if the conversion fails.

  • fromStringOrThrow

    Converts a string to a valid signed byte value or throws an exception if the value cannot be converted.

  • Integer8 (Constructor)

    Constructs a System.Integer8 object.

  • isEven

    Checks if the number is an even number.

  • isOdd

    Checks if the number is an odd number.

  • MAX_VALUE

    Represents the maximum value for the signed byte type.

  • MIN_VALUE

    Represents the minimum value for the signed byte type.

  • toBase

    Returns a string representation of the integer value using the specified base.

  • toBinary

    Returns the binary (base 2) value of the integer.

  • toDecimal

    Returns the decimal (base 10) value of the integer.

  • toExponential

    Formats the integer value using exponential notation.

  • toExternal

    Converts the signed byte value to its equivalent external value.

  • toFixed

    Formats the integer value using fixed-point notation.

  • toHex

    Returns the hexadecimal (base 16) value of the integer.

  • toPrecision

    Formats the integer value as a string to the given precision.

  • toString

    Converts the signed byte value to an equivalent string value.

  • valueOf

    Returns the primitive signed byte value wrapped by the System.Integer8 object.

Share

HTML | BBCode | Direct Link