Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for nextIndex (0.07 sec)

  1. android/guava/src/com/google/common/collect/CartesianList.java

        if (list.size() != axes.size()) {
          return -1;
        }
        ListIterator<?> itr = list.listIterator();
        int computedIndex = 0;
        while (itr.hasNext()) {
          int axisIndex = itr.nextIndex();
          int elemIndex = axes.get(axisIndex).indexOf(itr.next());
          if (elemIndex == -1) {
            return -1;
          }
          computedIndex += elemIndex * axesSizeProduct[axisIndex + 1];
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/AbstractIndexedListIterator.java

      protected AbstractIndexedListIterator(int size) {
        this(size, 0);
      }
    
      /**
       * Constructs an iterator across a sequence of the given size with the given initial position.
       * That is, the first call to {@link #nextIndex()} will return {@code position}, and the first
       * call to {@link #next()} will return the element at that index, if available. Calls to {@link
       * #previous()} can retrieve the preceding {@code position} elements.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jul 09 17:31:04 UTC 2021
    - 3.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

        public T next() {
          if (!hasNext()) {
            throw new NoSuchElementException();
          }
          T result = result(entryIndex);
          toRemove = entryIndex;
          entryIndex = backingMap.nextIndex(entryIndex);
          return result;
        }
    
        @Override
        public void remove() {
          checkForConcurrentModification();
          CollectPreconditions.checkRemove(toRemove != -1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/UnmodifiableListIteratorTest.java

            }
            return array[i++];
          }
    
          @Override
          public boolean hasPrevious() {
            return i > 0;
          }
    
          @Override
          public int nextIndex() {
            return i;
          }
    
          @Override
          public String previous() {
            if (!hasPrevious()) {
              throw new NoSuchElementException();
            }
            return array[--i];
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/escape/UnicodeEscaper.java

              destIndex += escaped.length;
            }
            // If we dealt with an escaped character, reset the unescaped range.
            unescapedChunkStart = nextIndex;
          }
          index = nextEscapeIndex(s, nextIndex, end);
        }
    
        // Process trailing unescaped characters - no need to account for escaped
        // length or padding the allocation.
        int charsSkipped = end - unescapedChunkStart;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 18 20:55:09 UTC 2022
    - 13.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ObjectCountHashMap.java

        init(DEFAULT_SIZE, DEFAULT_LOAD_FACTOR);
      }
    
      ObjectCountHashMap(ObjectCountHashMap<? extends K> map) {
        init(map.size(), DEFAULT_LOAD_FACTOR);
        for (int i = map.firstIndex(); i != -1; i = map.nextIndex(i)) {
          put(map.getKey(i), map.getValue(i));
        }
      }
    
      /**
       * Constructs a new instance of {@code ObjectCountHashMap} with the specified capacity.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 01 22:07:10 UTC 2021
    - 15K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/Lists.java

              }
              canRemoveOrSet = true;
              return forwardIterator.previous();
            }
    
            @Override
            public int nextIndex() {
              return reversePosition(forwardIterator.nextIndex());
            }
    
            @Override
            @ParametricNullness
            public T previous() {
              if (!hasPrevious()) {
                throw new NoSuchElementException();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ListsTest.java

        ListIterator<String> iterator = list.listIterator(1);
        assertEquals(1, iterator.nextIndex());
        assertEquals("2", iterator.next());
        assertEquals("3", iterator.next());
        assertEquals("4", iterator.next());
        assertEquals(4, iterator.nextIndex());
        try {
          iterator.next();
          fail("did not detect end of list");
        } catch (NoSuchElementException expected) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ListsTest.java

        ListIterator<String> iterator = list.listIterator(1);
        assertEquals(1, iterator.nextIndex());
        assertEquals("2", iterator.next());
        assertEquals("3", iterator.next());
        assertEquals("4", iterator.next());
        assertEquals(4, iterator.nextIndex());
        try {
          iterator.next();
          fail("did not detect end of list");
        } catch (NoSuchElementException expected) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/IteratorsTest.java

      public void testEmptyListIterator() {
        ListIterator<String> iterator = Iterators.emptyListIterator();
        assertFalse(iterator.hasNext());
        assertFalse(iterator.hasPrevious());
        assertEquals(0, iterator.nextIndex());
        assertEquals(-1, iterator.previousIndex());
        assertThrows(NoSuchElementException.class, () -> iterator.next());
        assertThrows(NoSuchElementException.class, () -> iterator.previous());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
Back to top