Search Options

Results per page
Sort
Preferred Languages
Advance

Results 781 - 790 of 838 for useEmpty (0.14 sec)

  1. guava/src/com/google/common/util/concurrent/Striped.java

       */
      public Iterable<L> bulkGet(Iterable<? extends Object> keys) {
        // Initially using the list to store the keys, then reusing it to store the respective L's
        List<Object> result = newArrayList(keys);
        if (result.isEmpty()) {
          return ImmutableList.of();
        }
        int[] stripes = new int[result.size()];
        for (int i = 0; i < result.size(); i++) {
          stripes[i] = indexFor(result.get(i));
        }
        Arrays.sort(stripes);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/primitives/Bytes.java

          this.array = array;
          this.start = start;
          this.end = end;
        }
    
        @Override
        public int size() {
          return end - start;
        }
    
        @Override
        public boolean isEmpty() {
          return false;
        }
    
        @Override
        public Byte get(int index) {
          checkElementIndex(index, size());
          return array[start + index];
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/BloomFilterTest.java

                } while (stopwatch.elapsed(SECONDS) < 1);
              }
            };
    
        List<Throwable> exceptions = runThreadsAndReturnExceptions(numThreads, task);
    
        assertThat(exceptions).isEmpty();
      }
    
      private static List<Throwable> runThreadsAndReturnExceptions(int numThreads, Runnable task) {
        List<Thread> threads = new ArrayList<>(numThreads);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableList.java

        return listIterator(0);
      }
    
      @SuppressWarnings("unchecked")
      @Override
      public UnmodifiableListIterator<E> listIterator(int index) {
        checkPositionIndex(index, size());
        if (isEmpty()) {
          return (UnmodifiableListIterator<E>) EMPTY_ITR;
        } else {
          return new Itr<E>(this, index);
        }
      }
    
      /** A singleton implementation of iterator() for the empty ImmutableList. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  5. cmd/config-current.go

    		globalEtcdClient, err = etcd.New(etcdCfg)
    		if err != nil {
    			configLogIf(ctx, fmt.Errorf("Unable to initialize etcd config: %w", err))
    		}
    
    		if len(globalDomainNames) != 0 && !globalDomainIPs.IsEmpty() && globalEtcdClient != nil {
    			if globalDNSConfig != nil {
    				// if global DNS is already configured, indicate with a warning, in case
    				// users are confused.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 18:23:41 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> cycle = Iterators.cycle(iterable);
        assertTrue(cycle.hasNext());
        assertEquals("a", cycle.next());
        assertTrue(cycle.hasNext());
        cycle.remove();
        assertTrue(iterable.elements.isEmpty());
        assertFalse(cycle.hasNext());
      }
    
      public void testCycleNoSuchElementException() {
        Iterable<String> iterable = Lists.newArrayList("a");
        Iterator<String> cycle = Iterators.cycle(iterable);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multimaps.java

        @Override
        public Collection<V2> get(@ParametricNullness final K key) {
          return transform(key, fromMultimap.get(key));
        }
    
        @Override
        public boolean isEmpty() {
          return fromMultimap.isEmpty();
        }
    
        @Override
        Set<K> createKeySet() {
          return fromMultimap.keySet();
        }
    
        @Override
        Multiset<K> createKeys() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        // notification.
        assertEquals(expectedKeys, Sets.union(cache.asMap().keySet(), removalNotifications.keySet()));
        assertTrue(Sets.intersection(cache.asMap().keySet(), removalNotifications.keySet()).isEmpty());
        threadPool.shutdown();
        threadPool.awaitTermination(300, SECONDS);
      }
    
      /**
       * Calls get() repeatedly from many different threads, and tests that all of the removed entries
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

       *     are any duplicate services.
       */
      public ServiceManager(Iterable<? extends Service> services) {
        ImmutableList<Service> copy = ImmutableList.copyOf(services);
        if (copy.isEmpty()) {
          // Having no services causes the manager to behave strangely. Notably, listeners are never
          // fired. To avoid this we substitute a placeholder service.
          logger
              .get()
              .log(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/net/InternetDomainName.java

       * already-validated InternetDomainName, as in {@link ancestor}.
       */
      private InternetDomainName(String name, ImmutableList<String> parts) {
        checkArgument(!parts.isEmpty(), "Cannot create an InternetDomainName with zero parts.");
        this.name = name;
        this.parts = parts;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 05 20:47:23 UTC 2024
    - 28K bytes
    - Viewed (0)
Back to top