Klasse UnsignedByte
java.lang.Object
ch.nolix.core.programatom.unsignedbyte.UnsignedByte
A
UnsignedByte
is not mutable.- Version:
- 2019-09-06
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
KonstruktorBeschreibungUnsignedByte
(byte pByte) Creates a newUnsignedByte
with the given pByte.UnsignedByte
(int bit1, int bit2, int bit3, int bit4, int bit5, int bit6, int bit7, int bit8) Creates a newUnsignedByte
with the given bits. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic UnsignedByte
fromNumber
(int number) boolean
getBitAt
(int index) int
getBitAtAsInt
(int index) byte
toByte()
int
toInt()
-
Konstruktordetails
-
UnsignedByte
public UnsignedByte(byte pByte) Creates a newUnsignedByte
with the given pByte.- Parameter:
pByte
-
-
UnsignedByte
public UnsignedByte(int bit1, int bit2, int bit3, int bit4, int bit5, int bit6, int bit7, int bit8) Creates a newUnsignedByte
with the given bits.- Parameter:
bit1
-bit2
-bit3
-bit4
-bit5
-bit6
-bit7
-bit8
-
-
-
Methodendetails
-
fromNumber
- Parameter:
number
-- Gibt zurück:
- a new
UnsignedByte
from the given number. - Löst aus:
ArgumentIsOutOfRangeException
- if the given number is not in [0, 255].
-
getBitAt
public boolean getBitAt(int index) - Parameter:
index
-- Gibt zurück:
- the bit at the given index from the current
UnsignedByte
.
-
getBitAtAsInt
public int getBitAtAsInt(int index) - Parameter:
index
-- Gibt zurück:
- the bit at the given index from the current
UnsignedByte
as int.
-
toBitString
- Gibt zurück:
- a
String
with the bits of the currentUnsignedByte
.
-
toByte
public byte toByte()- Gibt zurück:
- the current
UnsignedByte
as byte.
-
toInt
public int toInt()- Gibt zurück:
- the current
UnsignedByte
as int.
-