Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 518 for init (0.27 sec)

  1. guava-tests/test/com/google/common/collect/IteratorsTest.java

        assertTrue(enumer.hasMoreElements());
        assertEquals(1, (int) enumer.nextElement());
        assertTrue(enumer.hasMoreElements());
        assertEquals(2, (int) enumer.nextElement());
        assertTrue(enumer.hasMoreElements());
        assertEquals(3, (int) enumer.nextElement());
        assertFalse(enumer.hasMoreElements());
      }
    
      private static Enumeration<Integer> enumerate(int... ints) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/SetsTest.java

      }
    
      private static Object objectWithHashCode(final int hashCode) {
        return new Object() {
          @Override
          public int hashCode() {
            return hashCode;
          }
        };
      }
    
      // TODO b/327389044 - `Set<? extends Object> elements` should be enough but J2KT needs the <E>
      private static <E> void assertPowerSetHashCode(int expected, Set<E> elements) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 49.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testOr_T_present() {
        assertEquals("a", Optional.of("a").or("default"));
      }
    
      public void testOr_T_absent() {
        assertEquals("default", Optional.absent().or("default"));
      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testOr_supplier_present() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/RegularImmutableMap.java

        } else {
          /*
           * Use 32 bits per entry.
           */
          int[] hashTable = new int[tableSize];
          Arrays.fill(hashTable, ABSENT);
    
          int outI = 0;
          entries:
          for (int i = 0; i < n; i++) {
            int keyIndex = 2 * i + keyOffset;
            int outKeyIndex = 2 * outI + keyOffset;
            // requireNonNull is safe because the first `2*n` elements have been filled in.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 15 22:32:14 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/TreeMultiset.java

          return 0;
        }
        int[] result = new int[1]; // used as a mutable int reference to hold result
        AvlNode<E> newRoot = root.add(comparator(), element, occurrences, result);
        rootReference.checkAndSet(root, newRoot);
        return result[0];
      }
    
      @CanIgnoreReturnValue
      @Override
      public int remove(@CheckForNull Object element, int occurrences) {
        checkNonnegative(occurrences, "occurrences");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 34.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java

          return false;
        }
      }
    
      private int unsafeBinarySearch(Object key) throws ClassCastException {
        return Collections.binarySearch(elements, key, unsafeComparator());
      }
    
      @Override
      boolean isPartialView() {
        return elements.isPartialView();
      }
    
      @Override
      int copyIntoArray(@Nullable Object[] dst, int offset) {
        return elements.copyIntoArray(dst, offset);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

        checkInitialCapacity(4, 8, 2);
      }
    
      private static void checkInitialCapacity(
          int concurrencyLevel, int initialCapacity, int segmentSize) {
        MapMakerInternalMap<Object, Object, ?, ?> map =
            makeMap(
                createMapMaker().concurrencyLevel(concurrencyLevel).initialCapacity(initialCapacity));
        for (int i = 0; i < map.segments.length; i++) {
          assertEquals(segmentSize, map.segments[i].table.length());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 35.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

        checkInitialCapacity(4, 8, 2);
      }
    
      private static void checkInitialCapacity(
          int concurrencyLevel, int initialCapacity, int segmentSize) {
        MapMakerInternalMap<Object, Object, ?, ?> map =
            makeMap(
                createMapMaker().concurrencyLevel(concurrencyLevel).initialCapacity(initialCapacity));
        for (int i = 0; i < map.segments.length; i++) {
          assertEquals(segmentSize, map.segments[i].table.length());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 35.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ImmutableList.java

       */
      ImmutableList<E> subListUnchecked(int fromIndex, int toIndex) {
        return new SubList(fromIndex, toIndex - fromIndex);
      }
    
      class SubList extends ImmutableList<E> {
        final transient int offset;
        final transient int length;
    
        SubList(int offset, int length) {
          this.offset = offset;
          this.length = length;
        }
    
        @Override
        public int size() {
          return length;
        }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 30K bytes
    - Viewed (1)
  10. android/guava/src/com/google/common/collect/Multisets.java

      }
    
      /** An implementation of {@link Multiset#setCount(Object, int)}. */
      static <E extends @Nullable Object> int setCountImpl(
          Multiset<E> self, @ParametricNullness E element, int count) {
        checkNonnegative(count, "count");
    
        int oldCount = self.count(element);
    
        int delta = count - oldCount;
        if (delta > 0) {
          self.add(element, delta);
    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)
Back to top