Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,228 for ipIterator (0.16 sec)

  1. pkg/registry/core/service/ipallocator/ipallocator_test.go

    			var got uint64
    			iterator := ipIterator(tt.first, tt.last, tt.offset)
    
    			for {
    				ip := iterator()
    				if !ip.IsValid() {
    					break
    				}
    				got++
    			}
    			if got != tt.want {
    				t.Errorf("ipIterator() = %d, want %d", got, tt.want)
    			}
    			// check the iterator is fully stopped
    			for i := 0; i < 5; i++ {
    				if ip := iterator(); ip.IsValid() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 25 13:14:46 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/ipallocator.go

    	default:
    		offset = uint64(a.rand.Int63n(int64(rangeSize)))
    	}
    	iterator := ipIterator(a.offsetAddress, a.lastAddress, offset)
    	ip, err := a.allocateFromRange(iterator, svc)
    	if err == nil {
    		return ip, nil
    	}
    	// check the lower range
    	if a.rangeOffset != 0 {
    		offset = uint64(a.rand.Intn(a.rangeOffset))
    		iterator = ipIterator(a.firstAddress, a.offsetAddress.Prev(), offset)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
  3. subprojects/core/src/test/groovy/org/gradle/api/internal/collections/ListElementSourceTest.groovy

            iterator.next()
            iterator.next()
    
            then:
            iterator.previous() == "fuzz"
            iterator.previous() == "fizz"
            iterator.previous() == "foo"
            !iterator.hasPrevious()
    
            and:
            iterator.next() == "foo"
            iterator.next() == "fizz"
            iterator.next() == "fuzz"
            !iterator.hasNext()
    
            and:
            iterator.previous() == "fuzz"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 13 05:06:48 UTC 2020
    - 12.8K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/collect/testing/MinimalIterableTest.java

        try {
          iterator.next();
          fail();
        } catch (NoSuchElementException expected) {
        }
        try {
          iterable.iterator();
          fail();
        } catch (IllegalStateException expected) {
        }
      }
    
      public void testOf_one() {
        Iterable<String> iterable = MinimalIterable.of("a");
        Iterator<String> iterator = iterable.iterator();
        assertTrue(iterator.hasNext());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

      public void testSize0() {
        Iterator<String> iterator = Iterators.emptyIterator();
        assertEquals(0, Iterators.size(iterator));
      }
    
      public void testSize1() {
        Iterator<Integer> iterator = Collections.singleton(0).iterator();
        assertEquals(1, Iterators.size(iterator));
      }
    
      public void testSize_partiallyConsumed() {
        Iterator<Integer> iterator = asList(1, 2, 3, 4, 5).iterator();
        iterator.next();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 03 13:01:51 UTC 2024
    - 55.7K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java

       */
      static class IteratorWithSunJavaBug6529795<T> implements Iterator<T> {
        Iterator<T> iterator;
        boolean nextThrewException;
    
        IteratorWithSunJavaBug6529795(Iterator<T> iterator) {
          this.iterator = iterator;
        }
    
        @Override
        public boolean hasNext() {
          return iterator.hasNext();
        }
    
        @Override
        public T next() {
          try {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Iterators.java

          UnmodifiableIterator<T> iterator) {
        return checkNotNull(iterator);
      }
    
      /**
       * Returns the number of elements remaining in {@code iterator}. The iterator will be left
       * exhausted: its {@code hasNext()} method will return {@code false}.
       */
      public static int size(Iterator<?> iterator) {
        long count = 0L;
        while (iterator.hasNext()) {
          iterator.next();
          count++;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 03 14:46:32 UTC 2024
    - 50.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Iterators.java

          UnmodifiableIterator<T> iterator) {
        return checkNotNull(iterator);
      }
    
      /**
       * Returns the number of elements remaining in {@code iterator}. The iterator will be left
       * exhausted: its {@code hasNext()} method will return {@code false}.
       */
      public static int size(Iterator<?> iterator) {
        long count = 0L;
        while (iterator.hasNext()) {
          iterator.next();
          count++;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 03 14:46:32 UTC 2024
    - 50.2K bytes
    - Viewed (0)
  9. subprojects/core/src/test/groovy/org/gradle/api/internal/collections/SortedSetElementSourceTest.groovy

            then:
            iterator.hasNext()
            source.iterator().collect() == iterationOrder("foo", "fooz", "fizz", "fuzz")
    
            when:
            source.add("buzz")
            iterator = source.iterator()
            next = iterator.next()
    
            then:
            next == "buzz"
    
            when:
            iterator.remove()
    
            then:
            iterator.hasNext()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 02 15:12:14 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/collection/IndexedIterator.java

            assertArgumentNotNull("iterator", iterator);
    
            return () -> new IndexedIterator<>(iterator);
        }
    
        /**
         *
         * インスタンスを構築します。
         *
         * @param iterator
         *            イテレータ。{@literal null}であってはいけません
         */
        public IndexedIterator(final Iterator<T> iterator) {
            assertArgumentNotNull("iterator", iterator);
    
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.7K bytes
    - Viewed (0)
Back to top