int values, supporting arithmetic operations.
In some cases, when speed is more important than code readability, it may be faster simply to
treat primitive int values as unsigned, using the methods from UnsignedInts.
See the Guava User Guide article on unsigned primitive utilities.
| Modifier and Type | Field and Description |
|---|---|
| public static final UnsignedInteger | |
| public static final UnsignedInteger | |
| private final int | |
| public static final UnsignedInteger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public BigInteger | |
| public int | compareTo(UnsignedInteger
the object to be compared. other)Implements java. |
| public UnsignedInteger | |
| public double | doubleValue()
Implements abstract java. UnsignedInteger as a float, analogous to a widening
primitive conversion from int to double, and correctly rounded.
|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public float | floatValue()
Implements abstract java. UnsignedInteger as a float, analogous to a widening
primitive conversion from int to float, and correctly rounded.
|
| public static UnsignedInteger | |
| public int | |
| public int | intValue()
Implements abstract java. UnsignedInteger as an int.
|
| public long | longValue()
Implements abstract java. UnsignedInteger as a long.
|
| public UnsignedInteger | |
| public UnsignedInteger | |
| public UnsignedInteger | |
| public UnsignedInteger | |
| public String | toString()
Overrides java. UnsignedInteger value, in base 10.
|
| public String | |
| public static UnsignedInteger | |
| public static UnsignedInteger | valueOf(BigInteger value)
Returns a |
| public static UnsignedInteger | |
| public static UnsignedInteger |
| MAX_VALUE | back to summary |
|---|---|
| public static final UnsignedInteger MAX_VALUE | |
| ONE | back to summary |
|---|---|
| public static final UnsignedInteger ONE | |
| value | back to summary |
|---|---|
| private final int value | |
| ZERO | back to summary |
|---|---|
| public static final UnsignedInteger ZERO | |
| UnsignedInteger | back to summary |
|---|---|
| private UnsignedInteger(int value) | |
| bigIntegerValue | back to summary |
|---|---|
| public BigInteger bigIntegerValue() Returns the value of this | |
| compareTo | back to summary |
|---|---|
| public int compareTo(UnsignedInteger other) Implements java. Compares this unsigned integer to another unsigned integer. Returns
| |
| dividedBy | back to summary |
|---|---|
| public UnsignedInteger dividedBy(UnsignedInteger val) Returns the result of dividing this by
| |
| doubleValue | back to summary |
|---|---|
| public double doubleValue() Implements abstract java. Returns the value of this
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| floatValue | back to summary |
|---|---|
| public float floatValue() Implements abstract java. Returns the value of this
| |
| fromIntBits | back to summary |
|---|---|
| public static UnsignedInteger fromIntBits(int bits) Returns an If the argument is nonnegative, the returned result will be equal to To represent unsigned decimal constants, consider
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| intValue | back to summary |
|---|---|
| public int intValue() Implements abstract java. Returns the value of this Note that if this
| |
| longValue | back to summary |
|---|---|
| public long longValue() Implements abstract java. Returns the value of this
| |
| minus | back to summary |
|---|---|
| public UnsignedInteger minus(UnsignedInteger val) Returns the result of subtracting this and
| |
| mod | back to summary |
|---|---|
| public UnsignedInteger mod(UnsignedInteger val) Returns this mod
| |
| plus | back to summary |
|---|---|
| public UnsignedInteger plus(UnsignedInteger val) Returns the result of adding this and
| |
| times | back to summary |
|---|---|
| public UnsignedInteger times(UnsignedInteger val) Returns the result of multiplying this and
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the
| |
| toString | back to summary |
|---|---|
| public String toString(int radix) Returns a string representation of the | |
| valueOf | back to summary |
|---|---|
| public static UnsignedInteger valueOf(long value) Returns an | |
| valueOf | back to summary |
|---|---|
| public static UnsignedInteger valueOf(BigInteger value) Returns a
| |
| valueOf | back to summary |
|---|---|
| public static UnsignedInteger valueOf(String string) Returns an
| |
| valueOf | back to summary |
|---|---|
| public static UnsignedInteger valueOf(String string, int radix) Returns an
| |