Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 245 for hasNext (0.16 sec)

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

          assertEquals("b", cycle.next());
        }
      }
    
      public void testCycleOfTwoWithRemove() {
        Iterable<String> iterable = Lists.newArrayList("a", "b");
        Iterator<String> cycle = Iterators.cycle(iterable);
        assertTrue(cycle.hasNext());
        assertEquals("a", cycle.next());
        assertTrue(cycle.hasNext());
        assertEquals("b", cycle.next());
        assertTrue(cycle.hasNext());
    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/UnmodifiableListIteratorTest.java

        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
        try {
          iterator.remove();
          fail();
        } catch (UnsupportedOperationException expected) {
        }
      }
    
      @SuppressWarnings("DoNotCall")
      public void testAdd() {
        ListIterator<String> iterator = create();
    
        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/UnmodifiableIteratorTest.java

              int i;
    
              @Override
              public boolean hasNext() {
                return i < array.length;
              }
    
              @Override
              public String next() {
                if (!hasNext()) {
                  throw new NoSuchElementException();
                }
                return array[i++];
              }
            };
    
        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
        try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/AbstractSortedMultiset.java

      public Entry<E> firstEntry() {
        Iterator<Entry<E>> entryIterator = entryIterator();
        return entryIterator.hasNext() ? entryIterator.next() : null;
      }
    
      @Override
      @CheckForNull
      public Entry<E> lastEntry() {
        Iterator<Entry<E>> entryIterator = descendingEntryIterator();
        return entryIterator.hasNext() ? entryIterator.next() : null;
      }
    
      @Override
      @CheckForNull
      public Entry<E> pollFirstEntry() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

      }
    
      /**
       * Implementation for the EntryIterator, which is used to build Key and Value iterators.
       *
       * <p>Expiration is only checked on hasNext(), so as to ensure that a next() call never returns
       * null when hasNext() has already been called.
       */
      class EntryIterator implements Iterator<Entry<K, V>> {
        Iterator<Entry<K, Timestamped<V>>> iterator;
        Entry<K, Timestamped<V>> lastEntry;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 21.6K 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ForwardingSortedMultiset.java

       * forward to this implementation.
       */
      @CheckForNull
      protected Entry<E> standardFirstEntry() {
        Iterator<Entry<E>> entryIterator = entrySet().iterator();
        if (!entryIterator.hasNext()) {
          return null;
        }
        Entry<E> entry = entryIterator.next();
        return Multisets.immutableEntry(entry.getElement(), entry.getCount());
      }
    
      @Override
      @CheckForNull
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 23 18:43:40 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableMapValues.java

        return new UnmodifiableIterator<V>() {
          final UnmodifiableIterator<Entry<K, V>> entryItr = map.entrySet().iterator();
    
          @Override
          public boolean hasNext() {
            return entryItr.hasNext();
          }
    
          @Override
          public V next() {
            return entryItr.next().getValue();
          }
        };
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 3K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

        public String toString() {
          return toString;
        }
      }
    
      Stimulus<E, Iterator<E>> hasNext =
          new Stimulus<E, Iterator<E>>("hasNext") {
            @Override
            void executeAndCompare(ListIterator<E> reference, Iterator<E> target) {
              assertEquals(reference.hasNext(), target.hasNext());
            }
          };
      Stimulus<E, Iterator<E>> next =
          new Stimulus<E, Iterator<E>>("next") {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableMapValues.java

        return new UnmodifiableIterator<V>() {
          final UnmodifiableIterator<Entry<K, V>> entryItr = map.entrySet().iterator();
    
          @Override
          public boolean hasNext() {
            return entryItr.hasNext();
          }
    
          @Override
          public V next() {
            return entryItr.next().getValue();
          }
        };
      }
    
      @Override
      public Spliterator<V> spliterator() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 3.6K bytes
    - Viewed (0)
Back to top