Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for saturatedCast (0.17 sec)

  1. android/guava-tests/test/com/google/common/primitives/SignedBytesTest.java

        for (byte value : VALUES) {
          assertThat(SignedBytes.saturatedCast((long) value)).isEqualTo(value);
        }
        assertThat(SignedBytes.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST);
        assertThat(SignedBytes.saturatedCast(LEAST - 1L)).isEqualTo(LEAST);
        assertThat(SignedBytes.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST);
        assertThat(SignedBytes.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/SignedBytesTest.java

        for (byte value : VALUES) {
          assertThat(SignedBytes.saturatedCast((long) value)).isEqualTo(value);
        }
        assertThat(SignedBytes.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST);
        assertThat(SignedBytes.saturatedCast(LEAST - 1L)).isEqualTo(LEAST);
        assertThat(SignedBytes.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST);
        assertThat(SignedBytes.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/JdkBackedImmutableMultiset.java

      @Override
      Entry<E> getEntry(int index) {
        return entries.get(index);
      }
    
      @Override
      boolean isPartialView() {
        return false;
      }
    
      @Override
      public int size() {
        return Ints.saturatedCast(size);
      }
    
      // redeclare to help optimizers with b/310253115
      @SuppressWarnings("RedundantOverride")
      @Override
      @J2ktIncompatible
      @GwtIncompatible
        Object writeReplace() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Apr 08 13:05:15 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/RegularImmutableMultiset.java

        this.contents = contents;
        long size = 0;
        for (int i = 0; i < contents.size(); i++) {
          size += contents.getValue(i);
        }
        this.size = Ints.saturatedCast(size);
      }
    
      @Override
      boolean isPartialView() {
        return false;
      }
    
      @Override
      public int count(@Nullable Object element) {
        return contents.get(element);
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/RegularImmutableSortedMultiset.java

        return (index >= 0) ? getCount(index) : 0;
      }
    
      @Override
      public int size() {
        long size = cumulativeCounts[offset + length] - cumulativeCounts[offset];
        return Ints.saturatedCast(size);
      }
    
      @Override
      public ImmutableSortedSet<E> elementSet() {
        return elementSet;
      }
    
      @Override
      public ImmutableSortedMultiset<E> headMultiset(E upperBound, BoundType boundType) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 28 01:26:26 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/AbstractBaseGraph.java

          @Override
          public UnmodifiableIterator<EndpointPair<N>> iterator() {
            return EndpointPairIterator.of(AbstractBaseGraph.this);
          }
    
          @Override
          public int size() {
            return Ints.saturatedCast(edgeCount());
          }
    
          @Override
          public boolean remove(@Nullable Object o) {
            throw new UnsupportedOperationException();
          }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/EnumMultiset.java

        }
      }
    
      @Override
      int distinctElements() {
        return distinctElements;
      }
    
      @Override
      public int size() {
        return Ints.saturatedCast(size);
      }
    
      @Override
      public int count(@Nullable Object element) {
        // isActuallyE checks for null, but we check explicitly to help nullness checkers.
        if (element == null || !isActuallyE(element)) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top