Package org.eolang
Class BytesOf
java.lang.Object
org.eolang.BytesOf
- All Implemented Interfaces:
Bytes
Bytes.
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAND operation.asNumber()Convert to double number.<T extends Number>
TConvert to number.asString()Convert to string.booleaninthashCode()not()NOT operation.OR operation.shift(int bits) Big-endian unsigned shift.sshift(int bits) Big-endian signed right shift.byte[]take()Get bytes itself.toString()XOR operation.
-
Constructor Details
-
BytesOf
Ctor.- Parameters:
str- UTF-8 Text.
-
BytesOf
public BytesOf(int number) Ctor.- Parameters:
number- Integer number.
-
BytesOf
public BytesOf(char chr) Ctor.- Parameters:
chr- Character.
-
BytesOf
public BytesOf(long number) Ctor.- Parameters:
number- Long number.
-
BytesOf
public BytesOf(double number) Ctor.- Parameters:
number- Double number.
-
BytesOf
public BytesOf(byte[] data) Ctor.- Parameters:
data- Data.
-
BytesOf
Ctor.- Parameters:
bytes- Bytes.
-
-
Method Details
-
not
Description copied from interface:BytesNOT operation. -
and
Description copied from interface:BytesAND operation. -
or
Description copied from interface:BytesOR operation. -
xor
Description copied from interface:BytesXOR operation. -
shift
Description copied from interface:BytesBig-endian unsigned shift. Shifts left if value is positive, or right otherwise. Does not perform sign extension. -
sshift
Description copied from interface:BytesBig-endian signed right shift. Performs sign extension, i.e. it will fill the top bits with 1 if the first bit is 1 and with 0 otherwise. -
asNumber
Description copied from interface:BytesConvert to double number. -
asNumber
Description copied from interface:BytesConvert to number. -
asString
Description copied from interface:BytesConvert to string. -
take
public byte[] take()Description copied from interface:BytesGet bytes itself. -
toString
-
equals
-
hashCode
public int hashCode()
-