Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for UnmodifiableIterator (0.11 sec)

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

            @Override
            protected Set<K> delegate() {
              return delegate.keySet();
            }
    
            @Override
            public Iterator<K> iterator() {
              return Iterators.unmodifiableIterator(delegate.keySet().iterator());
            }
    
            @Override
            public boolean removeAll(Collection<?> c) {
              return delegate.keySet().removeAll(c);
            }
    
            @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/TreeTraverser.java

                children(t).forEach(this);
              }
            }.accept(root);
          }
        };
      }
    
      UnmodifiableIterator<T> preOrderIterator(T root) {
        return new PreOrderIterator(root);
      }
    
      private final class PreOrderIterator extends UnmodifiableIterator<T> {
        private final Deque<Iterator<T>> stack;
    
        PreOrderIterator(T root) {
          this.stack = new ArrayDeque<>();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Iterators.java

      public static <T extends @Nullable Object> UnmodifiableIterator<T> unmodifiableIterator(
          Iterator<? extends T> iterator) {
        checkNotNull(iterator);
        if (iterator instanceof UnmodifiableIterator) {
          @SuppressWarnings("unchecked") // Since it's unmodifiable, the covariant cast is safe
          UnmodifiableIterator<T> result = (UnmodifiableIterator<T>) iterator;
          return result;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableEnumMap.java

      private ImmutableEnumMap(EnumMap<K, V> delegate) {
        this.delegate = delegate;
        checkArgument(!delegate.isEmpty());
      }
    
      @Override
      UnmodifiableIterator<K> keyIterator() {
        return Iterators.unmodifiableIterator(delegate.keySet().iterator());
      }
    
      @Override
      public int size() {
        return delegate.size();
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableEnumMap.java

      private ImmutableEnumMap(EnumMap<K, V> delegate) {
        this.delegate = delegate;
        checkArgument(!delegate.isEmpty());
      }
    
      @Override
      UnmodifiableIterator<K> keyIterator() {
        return Iterators.unmodifiableIterator(delegate.keySet().iterator());
      }
    
      @Override
      Spliterator<K> keySpliterator() {
        return delegate.keySet().spliterator();
      }
    
      @Override
      public int size() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/RegularImmutableSet.java

      // (In the backport, we don't need this suppression, but we keep it to minimize diffs.)
      @SuppressWarnings("unchecked")
      @Override
      public UnmodifiableIterator<E> iterator() {
        return (UnmodifiableIterator<E>) Iterators.forArray(elements);
      }
    
      @Override
      public Spliterator<E> spliterator() {
        return Spliterators.spliterator(elements, SPLITERATOR_CHARACTERISTICS);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableMultimap.java

        Object writeReplace() {
          return super.writeReplace();
        }
    
        private static final long serialVersionUID = 0;
      }
    
      @Override
      UnmodifiableIterator<Entry<K, V>> entryIterator() {
        return new UnmodifiableIterator<Entry<K, V>>() {
          final Iterator<? extends Entry<K, ? extends ImmutableCollection<V>>> asMapItr =
              map.entrySet().iterator();
          @CheckForNull K currentKey = null;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableMap.java

       * overrides it.
       */
      abstract ImmutableSet<K> createKeySet();
    
      UnmodifiableIterator<K> keyIterator() {
        final UnmodifiableIterator<Entry<K, V>> entryIterator = entrySet().iterator();
        return new UnmodifiableIterator<K>() {
          @Override
          public boolean hasNext() {
            return entryIterator.hasNext();
          }
    
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ImmutableMap.java

       * overrides it.
       */
      abstract ImmutableSet<K> createKeySet();
    
      UnmodifiableIterator<K> keyIterator() {
        final UnmodifiableIterator<Entry<K, V>> entryIterator = entrySet().iterator();
        return new UnmodifiableIterator<K>() {
          @Override
          public boolean hasNext() {
            return entryIterator.hasNext();
          }
    
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/SingletonImmutableSet.java

      }
    
      @Override
      public int size() {
        return 1;
      }
    
      @Override
      public boolean contains(@CheckForNull Object target) {
        return element.equals(target);
      }
    
      @Override
      public UnmodifiableIterator<E> iterator() {
        return singletonIterator(element);
      }
    
      @Override
      public ImmutableList<E> asList() {
        return ImmutableList.of(element);
      }
    
      @Override
      boolean isPartialView() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top