|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
net.sourceforge.juint.UInt8
public class UInt8
Unsigned 8-bit integer.
Field Summary | |
---|---|
static short |
MAX_VALUE
The largest possible value. |
static short |
MIN_VALUE
The smallest possible value. |
Constructor Summary | |
---|---|
UInt8(byte bite)
Creates a new instance from a byte . |
|
UInt8(int bite)
Creates a new instance from an int . |
|
UInt8(long bite)
Creates a new instance from a long . |
|
UInt8(short bite)
Creates a new instance from a short . |
Method Summary | |
---|---|
UInt8 |
addBitmask(UInt8 bitmask)
Sets the bits in the given bitmask. |
UInt8 |
and(UInt8 number)
Logical and. |
int |
compareTo(java.lang.Object object)
Compares this UInt8 to another UInt8 for order. |
double |
doubleValue()
Gets the value as a double . |
boolean |
equals(java.lang.Object object)
Compares this UInt8 to anoter UInt8 for equality. |
float |
floatValue()
Gets the value as a float . |
boolean |
hasBitmask(UInt8 bitmask)
Determines if this number has the given bitmask. |
int |
hashCode()
Gets the hash code. |
int |
intValue()
Gets the value as an int . |
long |
longValue()
Gets the value as a long . |
UInt8 |
not()
Logical not. |
UInt8 |
or(UInt8 number)
Logical or. |
UInt8 |
removeBitmask(UInt8 bitmask)
Unsets the bits in the given bitmask. |
short |
shortValue()
Gets the value as a short . |
java.lang.String |
toString()
Gets the value as a String . |
short |
uint8Value()
Gets the value as an unsigned 8-bit integer. |
UInt8 |
xor(UInt8 number)
Logical xor. |
Methods inherited from class java.lang.Number |
---|
byteValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short MAX_VALUE
255
public static final short MIN_VALUE
0
Constructor Detail |
---|
public UInt8(byte bite)
byte
.
bite
- the value to be representedpublic UInt8(short bite)
short
.
bite
- the value to be representedpublic UInt8(int bite)
int
.
bite
- the value to be representedpublic UInt8(long bite)
long
.
bite
- the value to be representedMethod Detail |
---|
public short uint8Value()
public short shortValue()
short
.
shortValue
in class java.lang.Number
short
public int intValue()
int
.
intValue
in class java.lang.Number
int
public long longValue()
long
.
longValue
in class java.lang.Number
long
public float floatValue()
float
.
floatValue
in class java.lang.Number
float
public double doubleValue()
double
.
doubleValue
in class java.lang.Number
double
public int compareTo(java.lang.Object object)
UInt8
to another UInt8
for order.
compareTo
in interface java.lang.Comparable
object
- a UInt8
public boolean equals(java.lang.Object object)
UInt8
to anoter UInt8
for equality.
equals
in class java.lang.Object
object
- a UInt8
public int hashCode()
intValue()
.
hashCode
in class java.lang.Object
public java.lang.String toString()
String
.
toString
in class java.lang.Object
String
public UInt8 and(UInt8 number)
Bitwise
and
in interface Bitwise<UInt8>
public UInt8 not()
Bitwise
not
in interface Bitwise<UInt8>
public UInt8 or(UInt8 number)
Bitwise
or
in interface Bitwise<UInt8>
public UInt8 xor(UInt8 number)
Bitwise
xor
in interface Bitwise<UInt8>
public UInt8 addBitmask(UInt8 bitmask)
Bitwise
addBitmask
in interface Bitwise<UInt8>
public boolean hasBitmask(UInt8 bitmask)
Bitwise
hasBitmask
in interface Bitwise<UInt8>
true
if the number has the bitmask; false
otherwisepublic UInt8 removeBitmask(UInt8 bitmask)
Bitwise
removeBitmask
in interface Bitwise<UInt8>
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |