Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for max (0.14 sec)

  1. android/guava/src/com/google/common/collect/Multisets.java

          @Override
          public boolean isEmpty() {
            return multiset1.isEmpty() && multiset2.isEmpty();
          }
    
          @Override
          public int count(@CheckForNull Object element) {
            return Math.max(multiset1.count(element), multiset2.count(element));
          }
    
          @Override
          Set<E> createElementSet() {
            return Sets.union(multiset1.elementSet(), multiset2.elementSet());
          }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Comparators.java

       * @param b second value to compare.
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
       * @since 30.0
       */
      public static <T extends Comparable<? super T>> T max(T a, T b) {
        return (a.compareTo(b) >= 0) ? a : b;
      }
    
      /**
       * Returns the maximum of the two values, according to the given comparator. If the values compare
       * as equal, the first is returned.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/MoreCollectors.java

          if (element == null) {
            this.element = o;
          } else if (extras.isEmpty()) {
            // Replace immutable empty list with mutable list.
            extras = new ArrayList<>(MAX_EXTRAS);
            extras.add(o);
          } else if (extras.size() < MAX_EXTRAS) {
            extras.add(o);
          } else {
            throw multiples(true);
          }
        }
    
        ToOptionalState combine(ToOptionalState other) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Ordering.java

       *     ordering.
       */
      @ParametricNullness
      public <E extends T> E max(
          @ParametricNullness E a, @ParametricNullness E b, @ParametricNullness E c, E... rest) {
        E maxSoFar = max(max(a, b), c);
    
        for (E r : rest) {
          maxSoFar = max(maxSoFar, r);
        }
    
        return maxSoFar;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ListsTest.java

        assertEquals(89, Lists.computeArrayListCapacity(77));
        assertEquals(22000005, Lists.computeArrayListCapacity(20000000));
        assertEquals(Integer.MAX_VALUE, Lists.computeArrayListCapacity(Integer.MAX_VALUE - 1000));
      }
    
      public void testNewArrayListFromCollection() {
        ArrayList<Integer> list = Lists.newArrayList(SOME_COLLECTION);
        assertEquals(SOME_COLLECTION, list);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableSet.java

      static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO;
    
      // Represents how tightly we can pack things, as a maximum.
      private static final double DESIRED_LOAD_FACTOR = 0.7;
    
      // If the set has this many elements, it will "max out" the table size
      private static final int CUTOFF = (int) (MAX_TABLE_SIZE * DESIRED_LOAD_FACTOR);
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ListsTest.java

        assertEquals(89, Lists.computeArrayListCapacity(77));
        assertEquals(22000005, Lists.computeArrayListCapacity(20000000));
        assertEquals(Integer.MAX_VALUE, Lists.computeArrayListCapacity(Integer.MAX_VALUE - 1000));
      }
    
      public void testNewArrayListFromCollection() {
        ArrayList<Integer> list = Lists.newArrayList(SOME_COLLECTION);
        assertEquals(SOME_COLLECTION, list);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Iterables.java

       *
       * <p><b>Note:</b> The current implementation eagerly allocates storage for {@code size} elements.
       * As a consequence, passing values like {@code Integer.MAX_VALUE} can lead to {@link
       * OutOfMemoryError}.
       *
       * <p><b>Note:</b> if {@code iterable} is a {@link List}, use {@link Lists#partition(List, int)}
       * instead.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

          Integer result = size;
          if (result == null) {
            long total = 0;
            for (Range<C> range : ranges) {
              total += ContiguousSet.create(range, domain).size();
              if (total >= Integer.MAX_VALUE) {
                break;
              }
            }
            result = size = Ints.saturatedCast(total);
          }
          return result.intValue();
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableMultiset.java

              contents.ensureCapacity(Math.max(contents.size(), backingMap.size()));
              for (int i = backingMap.firstIndex(); i >= 0; i = backingMap.nextIndex(i)) {
                addCopies(backingMap.getKey(i), backingMap.getValue(i));
              }
            } else {
              Set<? extends Entry<? extends E>> entries = multiset.entrySet();
              contents.ensureCapacity(Math.max(contents.size(), entries.size())); // might overlap
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top