Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. 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)
Back to top