/external/guava/guava-tests/test/com/google/common/primitives/ |
D | SignedBytesTest.java | 57 assertEquals(value, SignedBytes.saturatedCast((long) value)); in testSaturatedCast() 59 assertEquals(GREATEST, SignedBytes.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 60 assertEquals(LEAST, SignedBytes.saturatedCast(LEAST - 1L)); in testSaturatedCast() 61 assertEquals(GREATEST, SignedBytes.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 62 assertEquals(LEAST, SignedBytes.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | UnsignedIntsTest.java | 74 assertEquals(value, UnsignedInts.toLong(UnsignedInts.saturatedCast(value))); in testSaturatedCast() 76 assertEquals(GREATEST, UnsignedInts.saturatedCast(1L << 32)); in testSaturatedCast() 77 assertEquals(LEAST, UnsignedInts.saturatedCast(-1L)); in testSaturatedCast() 78 assertEquals(GREATEST, UnsignedInts.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 79 assertEquals(LEAST, UnsignedInts.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | UnsignedBytesTest.java | 62 assertEquals(value, UnsignedBytes.saturatedCast(UnsignedBytes.toInt(value))); in testSaturatedCast() 64 assertEquals(GREATEST, UnsignedBytes.saturatedCast(256L)); in testSaturatedCast() 65 assertEquals(LEAST, UnsignedBytes.saturatedCast(-1L)); in testSaturatedCast() 66 assertEquals(GREATEST, UnsignedBytes.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 67 assertEquals(LEAST, UnsignedBytes.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | CharsTest.java | 67 assertEquals(value, Chars.saturatedCast((long) value)); in testSaturatedCast() 69 assertEquals(GREATEST, Chars.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 70 assertEquals(LEAST, Chars.saturatedCast(LEAST - 1L)); in testSaturatedCast() 71 assertEquals(GREATEST, Chars.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 72 assertEquals(LEAST, Chars.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | ShortsTest.java | 68 assertEquals(value, Shorts.saturatedCast((long) value)); in testSaturatedCast() 70 assertEquals(GREATEST, Shorts.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 71 assertEquals(LEAST, Shorts.saturatedCast(LEAST - 1L)); in testSaturatedCast() 72 assertEquals(GREATEST, Shorts.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 73 assertEquals(LEAST, Shorts.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | IntsTest.java | 68 assertEquals(value, Ints.saturatedCast((long) value)); in testSaturatedCast() 70 assertEquals(GREATEST, Ints.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 71 assertEquals(LEAST, Ints.saturatedCast(LEAST - 1L)); in testSaturatedCast() 72 assertEquals(GREATEST, Ints.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 73 assertEquals(LEAST, Ints.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
/external/guava/android/guava-tests/test/com/google/common/primitives/ |
D | SignedBytesTest.java | 57 assertEquals(value, SignedBytes.saturatedCast((long) value)); in testSaturatedCast() 59 assertEquals(GREATEST, SignedBytes.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 60 assertEquals(LEAST, SignedBytes.saturatedCast(LEAST - 1L)); in testSaturatedCast() 61 assertEquals(GREATEST, SignedBytes.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 62 assertEquals(LEAST, SignedBytes.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | UnsignedIntsTest.java | 74 assertEquals(value, UnsignedInts.toLong(UnsignedInts.saturatedCast(value))); in testSaturatedCast() 76 assertEquals(GREATEST, UnsignedInts.saturatedCast(1L << 32)); in testSaturatedCast() 77 assertEquals(LEAST, UnsignedInts.saturatedCast(-1L)); in testSaturatedCast() 78 assertEquals(GREATEST, UnsignedInts.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 79 assertEquals(LEAST, UnsignedInts.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | UnsignedBytesTest.java | 62 assertEquals(value, UnsignedBytes.saturatedCast(UnsignedBytes.toInt(value))); in testSaturatedCast() 64 assertEquals(GREATEST, UnsignedBytes.saturatedCast(256L)); in testSaturatedCast() 65 assertEquals(LEAST, UnsignedBytes.saturatedCast(-1L)); in testSaturatedCast() 66 assertEquals(GREATEST, UnsignedBytes.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 67 assertEquals(LEAST, UnsignedBytes.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | CharsTest.java | 67 assertEquals(value, Chars.saturatedCast((long) value)); in testSaturatedCast() 69 assertEquals(GREATEST, Chars.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 70 assertEquals(LEAST, Chars.saturatedCast(LEAST - 1L)); in testSaturatedCast() 71 assertEquals(GREATEST, Chars.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 72 assertEquals(LEAST, Chars.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | ShortsTest.java | 68 assertEquals(value, Shorts.saturatedCast((long) value)); in testSaturatedCast() 70 assertEquals(GREATEST, Shorts.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 71 assertEquals(LEAST, Shorts.saturatedCast(LEAST - 1L)); in testSaturatedCast() 72 assertEquals(GREATEST, Shorts.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 73 assertEquals(LEAST, Shorts.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
D | IntsTest.java | 68 assertEquals(value, Ints.saturatedCast((long) value)); in testSaturatedCast() 70 assertEquals(GREATEST, Ints.saturatedCast(GREATEST + 1L)); in testSaturatedCast() 71 assertEquals(LEAST, Ints.saturatedCast(LEAST - 1L)); in testSaturatedCast() 72 assertEquals(GREATEST, Ints.saturatedCast(Long.MAX_VALUE)); in testSaturatedCast() 73 assertEquals(LEAST, Ints.saturatedCast(Long.MIN_VALUE)); in testSaturatedCast()
|
/external/guava/guava/src/com/google/common/math/ |
D | IntMath.java | 536 return Ints.saturatedCast((long) a + b); 547 return Ints.saturatedCast((long) a - b); 558 return Ints.saturatedCast((long) a * b);
|
/external/guava/android/guava/src/com/google/common/math/ |
D | IntMath.java | 536 return Ints.saturatedCast((long) a + b); 547 return Ints.saturatedCast((long) a - b); 558 return Ints.saturatedCast((long) a * b);
|
/external/guava/android/guava-tests/test/com/google/common/math/ |
D | IntMathTest.java | 556 a, b, "s+", saturatedCast(valueOf(a).add(valueOf(b))), IntMath.saturatedAdd(a, b)); in testSaturatedAdd() 570 saturatedCast(valueOf(a).subtract(valueOf(b))), in testSaturatedSubtract() 585 saturatedCast(valueOf(a).multiply(valueOf(b))), in testSaturatedMultiply() 596 a, b, "s^", saturatedCast(valueOf(a).pow(b)), IntMath.saturatedPow(a, b)); in testSaturatedPow() 604 private static int saturatedCast(BigInteger big) { in saturatedCast() method in IntMathTest
|
D | LongMathTest.java | 665 a, b, "s+", saturatedCast(valueOf(a).add(valueOf(b))), LongMath.saturatedAdd(a, b)); in testSaturatedAdd() 679 saturatedCast(valueOf(a).subtract(valueOf(b))), in testSaturatedSubtract() 694 saturatedCast(valueOf(a).multiply(valueOf(b))), in testSaturatedMultiply() 705 a, b, "s^", saturatedCast(valueOf(a).pow(b)), LongMath.saturatedPow(a, b)); in testSaturatedPow() 873 private static long saturatedCast(BigInteger big) { in saturatedCast() method in LongMathTest
|
/external/guava/guava-tests/test/com/google/common/math/ |
D | IntMathTest.java | 556 a, b, "s+", saturatedCast(valueOf(a).add(valueOf(b))), IntMath.saturatedAdd(a, b)); in testSaturatedAdd() 570 saturatedCast(valueOf(a).subtract(valueOf(b))), in testSaturatedSubtract() 585 saturatedCast(valueOf(a).multiply(valueOf(b))), in testSaturatedMultiply() 596 a, b, "s^", saturatedCast(valueOf(a).pow(b)), IntMath.saturatedPow(a, b)); in testSaturatedPow() 604 private static int saturatedCast(BigInteger big) { in saturatedCast() method in IntMathTest
|
D | LongMathTest.java | 665 a, b, "s+", saturatedCast(valueOf(a).add(valueOf(b))), LongMath.saturatedAdd(a, b)); in testSaturatedAdd() 679 saturatedCast(valueOf(a).subtract(valueOf(b))), in testSaturatedSubtract() 694 saturatedCast(valueOf(a).multiply(valueOf(b))), in testSaturatedMultiply() 705 a, b, "s^", saturatedCast(valueOf(a).pow(b)), LongMath.saturatedPow(a, b)); in testSaturatedPow() 873 private static long saturatedCast(BigInteger big) { in saturatedCast() method in LongMathTest
|
/external/guava/guava/src/com/google/common/collect/ |
D | JdkBackedImmutableMultiset.java | 88 return Ints.saturatedCast(size); in size()
|
D | RegularImmutableSortedMultiset.java | 97 return Ints.saturatedCast(size); in size()
|
/external/guava/android/guava/src/com/google/common/primitives/ |
D | SignedBytes.java | 70 public static byte saturatedCast(long value) { in saturatedCast() method in SignedBytes
|
/external/guava/guava/src/com/google/common/primitives/ |
D | SignedBytes.java | 70 public static byte saturatedCast(long value) { in saturatedCast() method in SignedBytes
|
D | UnsignedInts.java | 107 public static int saturatedCast(long value) { in saturatedCast() method in UnsignedInts
|
/external/guava/android/guava/src/com/google/common/collect/ |
D | RegularImmutableMultiset.java | 49 this.size = Ints.saturatedCast(size); in RegularImmutableMultiset()
|
D | RegularImmutableSortedMultiset.java | 88 return Ints.saturatedCast(size); in size()
|