Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 160 for hasNext (0.17 sec)

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

          this.iterator = iterable.iterator();
        }
    
        @Override
        public boolean hasNext() {
          return true; // pretend that you have more...
        }
    
        @Override
        public E next() {
          // ...but throw an unchecked exception when you ask for it.
          if (!iterator.hasNext()) {
            throw new ThrowsAtEndException();
          }
          return iterator.next();
        }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. maven-api-impl/src/main/java/org/apache/maven/internal/impl/MappedCollection.java

        }
    
        @Override
        public Iterator<U> iterator() {
            Iterator<V> it = list.iterator();
            return new Iterator<U>() {
                @Override
                public boolean hasNext() {
                    return it.hasNext();
                }
    
                @Override
                public U next() {
                    return mapper.apply(it.next());
                }
            };
        }
    
        @Override
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultDependencyManagementImporter.java

                Iterator<Exclusion> i1 = ce1.iterator();
                Iterator<Exclusion> i2 = ce2.iterator();
                while (i1.hasNext() && i2.hasNext()) {
                    if (!equals(i1.next(), i2.next())) {
                        return false;
                    }
                }
                return !i1.hasNext() && !i2.hasNext();
            }
            return false;
        }
    
        private boolean equals(Exclusion e1, Exclusion e2) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        }
    
        // If we have a routes left, use 'em.
        if (routeSelection?.hasNext() == true) return true
    
        // If we haven't initialized the route selector yet, assume it'll have at least one route.
        val localRouteSelector = routeSelector ?: return true
    
        // If we do have a route selector, use its routes.
        return localRouteSelector.hasNext()
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/IteratorTester.java

     *
     * <p>For instance, if <i>steps</i> is 5, one example sequence that will be tested is:
     *
     * <ol>
     *   <li>remove();
     *   <li>hasNext()
     *   <li>hasNext();
     *   <li>remove();
     *   <li>next();
     * </ol>
     *
     * <p>This particular order of operations may be unrealistic, and testing all 3^5 of them may be
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java

        // known nonempty since we checked targets.size() > 1
    
        if (!thisIterator.hasNext()) {
          return false;
        }
    
        Object target = thatIterator.next();
        E current = thisIterator.next();
        try {
          while (true) {
            int cmp = unsafeCompare(current, target);
    
            if (cmp < 0) {
              if (!thisIterator.hasNext()) {
                return false;
              }
    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. android/guava/src/com/google/common/collect/FilteredEntryMultimap.java

        Iterator<Entry<K, Collection<V>>> entryIterator = unfiltered.asMap().entrySet().iterator();
        boolean changed = false;
        while (entryIterator.hasNext()) {
          Entry<K, Collection<V>> entry = entryIterator.next();
          K key = entry.getKey();
          Collection<V> collection = filterCollection(entry.getValue(), new ValuePredicate(key));
          if (!collection.isEmpty()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/IteratorTester.java

     *
     * <p>For instance, if <i>steps</i> is 5, one example sequence that will be tested is:
     *
     * <ol>
     *   <li>remove();
     *   <li>hasNext()
     *   <li>hasNext();
     *   <li>remove();
     *   <li>next();
     * </ol>
     *
     * <p>This particular order of operations may be unrealistic, and testing all 3^5 of them may be
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/collection/EmptyIteratorTest.java

            emptyIterator.remove();
        }
    
        /**
         * Test method for
         * {@link org.codelibs.core.collection.EmptyIterator#hasNext()}.
         */
        @Test
        public void testHasNext() {
            final EmptyIterator<String> emptyIterator = new EmptyIterator<String>();
            assertThat(emptyIterator.hasNext(), is(false));
        }
    
        /**
         * Test method for {@link org.codelibs.core.collection.EmptyIterator#next()}.
         */
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/collection/EnumerationIteratorTest.java

            vector.add("a");
            final EnumerationIterator<String> itr = new EnumerationIterator<String>(vector.elements());
            assertThat(itr.hasNext(), is(true));
            assertThat(itr.next(), is("a"));
            assertThat(itr.hasNext(), is(not(true)));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testRemove() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.4K bytes
    - Viewed (0)
Back to top