Lines Matching refs:value

47   private final int value;
49 private UnsignedInteger(int value) {
50 this.value = value & 0xffffffff;
55 * equal to {@code value}.
57 public static UnsignedInteger asUnsigned(int value) {
58 return new UnsignedInteger(value);
62 * Returns an {@code UnsignedInteger} that is equal to {@code value},
65 public static UnsignedInteger valueOf(long value) {
66 checkArgument((value & INT_MASK) == value,
67 "value (%s) is outside the range for an unsigned integer value", value);
68 return asUnsigned((int) value);
72 * Returns a {@code UnsignedInteger} representing the same value as the specified
75 * @throws IllegalArgumentException if {@code value} is negative or {@code value >= 2^32}
77 public static UnsignedInteger valueOf(BigInteger value) {
78 checkNotNull(value);
79 checkArgument(value.signum() >= 0 && value.bitLength() <= Integer.SIZE,
80 "value (%s) is outside the range for an unsigned integer value", value);
81 return asUnsigned(value.intValue());
85 * Returns an {@code UnsignedInteger} holding the value of the specified {@code String}, parsed
86 * as an unsigned {@code int} value.
89 * value
96 * Returns an {@code UnsignedInteger} holding the value of the specified {@code String}, parsed
97 * as an unsigned {@code int} value in the specified radix.
100 * value
112 return asUnsigned(this.value + val.value);
121 return asUnsigned(this.value - val.value);
131 return asUnsigned(value * val.value);
139 return asUnsigned(UnsignedInts.divide(value, val.value));
147 return asUnsigned(UnsignedInts.remainder(value, val.value));
151 * Returns the value of this {@code UnsignedInteger} as an {@code int}. This is an inverse
154 * <p>Note that if this {@code UnsignedInteger} holds a value {@code >= 2^31}, the returned value
159 return value;
163 * Returns the value of this {@code UnsignedInteger} as a {@code long}.
167 return toLong(value);
171 * Returns the value of this {@code UnsignedInteger} as a {@code float}, analogous to a widening
180 * Returns the value of this {@code UnsignedInteger} as a {@code float}, analogous to a widening
189 * Returns the value of this {@code UnsignedInteger} as a {@link BigInteger}.
203 return compare(value, other.value);
208 return value;
215 return value == other.value;
221 * Returns a string representation of the {@code UnsignedInteger} value, in base 10.
229 * Returns a string representation of the {@code UnsignedInteger} value, in base {@code radix}.
234 return UnsignedInts.toString(value, radix);