- Sort Score
- Result 10 results
- Languages All
Results 31 - 37 of 37 for saturatedCast (0.24 sec)
-
guava/src/com/google/common/primitives/Chars.java
* {@link Character#MAX_VALUE} if it is too large, or {@link Character#MIN_VALUE} if it is too * small */ public static char saturatedCast(long value) { if (value > Character.MAX_VALUE) { return Character.MAX_VALUE; } if (value < Character.MIN_VALUE) { return Character.MIN_VALUE; } return (char) value; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Aug 27 16:47:48 UTC 2024 - 23.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/Lists.java
@VisibleForTesting static int computeArrayListCapacity(int arraySize) { checkNonnegative(arraySize, "arraySize"); // TODO(kevinb): Figure out the right behavior, and document it return Ints.saturatedCast(5L + arraySize + (arraySize / 10)); } /** * Creates an {@code ArrayList} instance backed by an array with the specified initial size; * simply delegates to {@link ArrayList#ArrayList(int)}. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 43.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
*/ public static int size(Iterator<?> iterator) { long count = 0L; while (iterator.hasNext()) { iterator.next(); count++; } return Ints.saturatedCast(count); } /** Returns {@code true} if {@code iterator} contains {@code element}. */ public static boolean contains(Iterator<?> iterator, @CheckForNull Object element) { if (element == null) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 50.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/MapMakerInternalMap.java
public int size() { Segment<K, V, E, S>[] segments = this.segments; long sum = 0; for (int i = 0; i < segments.length; ++i) { sum += segments[i].count; } return Ints.saturatedCast(sum); } @CheckForNull @Override public V get(@CheckForNull Object key) { if (key == null) { return null; } int hash = hash(key);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 90.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/MapMakerInternalMap.java
public int size() { Segment<K, V, E, S>[] segments = this.segments; long sum = 0; for (int i = 0; i < segments.length; ++i) { sum += segments[i].count; } return Ints.saturatedCast(sum); } @CheckForNull @Override public V get(@CheckForNull Object key) { if (key == null) { return null; } int hash = hash(key);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 90.8K bytes - Viewed (0) -
guava/src/com/google/common/cache/LocalCache.java
long sum = 0; for (Segment<K, V> segment : segments) { sum += segment.count; } return sum; } @Override public int size() { return Ints.saturatedCast(longSize()); } @CanIgnoreReturnValue // TODO(b/27479612): consider removing this @Override @CheckForNull public V get(@CheckForNull Object key) { if (key == null) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 149.2K bytes - Viewed (0) -
RELEASE.md
of the data type of the input image. * The image processing ops do not take `min` and `max` inputs any more, casting safety is handled by `saturate_cast`, which makes sure over- and underflows are handled before casting to data types with smaller ranges. * For C++ API users: `IsLegacyScalar` and `IsLegacyVector` are now gone from
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Oct 22 14:33:53 UTC 2024 - 735.3K bytes - Viewed (0)