Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for saturatedCast (0.07 sec)

  1. 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(@CheckForNull Object element) {
        return contents.get(element);
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 4.3K 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 // serialization
      @GwtIncompatible // serialization
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

        return backingMap.size();
      }
    
      @Override
      public final Iterator<E> iterator() {
        return Multisets.iteratorImpl(this);
      }
    
      @Override
      public final int size() {
        return Ints.saturatedCast(size);
      }
    
      /**
       * @serialData the number of distinct elements, the first element, its count, the second element,
       *     its count, and so on
       */
      @GwtIncompatible // java.io.ObjectOutputStream
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  5. 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(@CheckForNull Object o) {
            throw new UnsupportedOperationException();
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/SignedBytes.java

       * @return the same value cast to {@code byte} if it is in the range of the {@code byte} type,
       *     {@link Byte#MAX_VALUE} if it is too large, or {@link Byte#MIN_VALUE} if it is too small
       */
      public static byte saturatedCast(long value) {
        if (value > Byte.MAX_VALUE) {
          return Byte.MAX_VALUE;
        }
        if (value < Byte.MIN_VALUE) {
          return Byte.MIN_VALUE;
        }
        return (byte) value;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 7.3K bytes
    - Viewed (0)
Back to top