Package com.jackmeng.stl.types
Class UInt_t
java.lang.Object
java.lang.Number
com.jackmeng.stl.types.UInt_t
- All Implemented Interfaces:
stl_type<UInt_t>
,stl_type.type_Numerical<UInt_t>
,java.io.Serializable
,java.lang.Comparable<UInt_t>
public final class UInt_t extends java.lang.Number implements stl_type.type_Numerical<UInt_t>
Represents a standard Java 32 Bitness Unsigned Integer type.
This is not to be a wrapper class!!
- Author:
- Jack Meng
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jackmeng.stl.stl_type
stl_type.type_Numerical<E extends java.lang.Number>
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description private
UInt_t(int v)
-
Method Summary
Modifier and Type Method Description UInt_t
and(UInt_t e)
Generic Bitwise AND.int
compareTo(UInt_t o)
UInt_t
divide(UInt_t e)
Generic Numerical Division.double
doubleValue()
boolean
equals(java.lang.Object e)
float
floatValue()
int
intValue()
UInt_t
left(UInt_t e)
Generic Bitwise Left Shift.long
longValue()
static UInt_t
make(long t)
Turn a regular long into an unsigned integer.UInt_t
minus(UInt_t e)
Generic Numerical Subtraction.UInt_t
mod(UInt_t e)
Generic Numerical Modulo (Remainder Division).UInt_t
not()
Generic Bitwise Negation.UInt_t
or(UInt_t e)
Generic Bitwise OR.UInt_t
plus(UInt_t e)
Generic Numerical Addition.UInt_t
right(UInt_t e)
Generic Bitwise Right Shift.UInt_t
right_2(UInt_t e)
Generic Bitwise Right Shift.UInt_t
times(UInt_t e)
Generic Numerical Multiplication.UInt_t
xor(UInt_t e)
Generic Bitwise XOR.Methods inherited from class java.lang.Number
byteValue, shortValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
val
private final int val -
ZERO
ZERO = 0 -
ONE
ONE = 1 -
MAX_VALUE
MAX_VALUE = ?
-
-
Constructor Details
-
UInt_t
private UInt_t(int v)
-
-
Method Details
-
make
Turn a regular long into an unsigned integer.- Parameters:
t
- A value- Returns:
- An
UInt_t(int)
object
-
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<UInt_t>
-
equals
public boolean equals(java.lang.Object e)- Overrides:
equals
in classjava.lang.Object
-
intValue
public int intValue()- Specified by:
intValue
in classjava.lang.Number
-
longValue
public long longValue()- Specified by:
longValue
in classjava.lang.Number
-
floatValue
public float floatValue()- Specified by:
floatValue
in classjava.lang.Number
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in classjava.lang.Number
-
plus
Description copied from interface:stl_type.type_Numerical
Generic Numerical Addition. Where it is "this + (param.value)"- Specified by:
plus
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be added.- Returns:
- A new object instance that has the value of the final operation.
-
minus
Description copied from interface:stl_type.type_Numerical
Generic Numerical Subtraction. Where it is "this - (param.value)"- Specified by:
minus
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be subtracted.- Returns:
- A new object instance that has the value of the final operation.
-
times
Description copied from interface:stl_type.type_Numerical
Generic Numerical Multiplication. Where it is "this * (param.value)"- Specified by:
times
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be multiplied by.- Returns:
- A new object instance that has the value of the final operation.
-
divide
Description copied from interface:stl_type.type_Numerical
Generic Numerical Division. Where it is "this / (param.value)"- Specified by:
divide
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be divided by.- Returns:
- A new object instance that has the value of the final operation.
-
mod
Description copied from interface:stl_type.type_Numerical
Generic Numerical Modulo (Remainder Division). Where it is "this % (param.value)"- Specified by:
mod
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be modded.- Returns:
- A new object instance that has the value of the final operation.
-
not
Description copied from interface:stl_type.type_Numerical
Generic Bitwise Negation. Where it is "~this"- Specified by:
not
in interfacestl_type.type_Numerical<UInt_t>
- Returns:
- A new object instance that has the value of the final operation.
-
or
Description copied from interface:stl_type.type_Numerical
Generic Bitwise OR. Where it is "this | (param.value)"- Specified by:
or
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be bitwise ORed.- Returns:
- A new object instance that has the value of the final operation.
-
xor
Description copied from interface:stl_type.type_Numerical
Generic Bitwise XOR. Where it is "this ^ (param.value)"- Specified by:
xor
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be bitwise XORed.- Returns:
- A new object instance that has the value of the final operation.
-
and
Description copied from interface:stl_type.type_Numerical
Generic Bitwise AND. Where it is "this & (param.value)"- Specified by:
and
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to be bitwise ANDed.- Returns:
- A new object instance that has the value of the final operation.
-
left
Description copied from interface:stl_type.type_Numerical
Generic Bitwise Left Shift. Where it is "this << (param.value)"- Specified by:
left
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to left shift by.- Returns:
- A new object instance that has the value of the final operation.
-
right
Description copied from interface:stl_type.type_Numerical
Generic Bitwise Right Shift. Where it is "this >> (param.value)"- Specified by:
right
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to right shift by.- Returns:
- A new object instance that has the value of the final operation.
-
right_2
Description copied from interface:stl_type.type_Numerical
Generic Bitwise Right Shift. Where it is "this >>> (param.value)" with zero fill. Discarding bits and fill from the left with zeroes.- Specified by:
right_2
in interfacestl_type.type_Numerical<UInt_t>
- Parameters:
e
- The other type to right shift by.- Returns:
- A new object instance that has the value of the final operation.
-