Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for forArray (0.06 sec)

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

      }
    
      public void testCopyOf_iterator_oneElementRepeated() {
        Iterator<String> iterator = Iterators.forArray("a", "a", "a");
        Set<String> set = copyOf(iterator);
        assertEquals(singleton("a"), set);
      }
    
      public void testCopyOf_iterator_general() {
        Iterator<String> iterator = Iterators.forArray("a", "b", "a");
        Set<String> set = copyOf(iterator);
        assertEquals(2, set.size());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

          @Override
          protected Iterator<Integer> newTargetIterator() {
            return Iterators.forArray(1, 2, 3);
          }
        }.test();
      }
    
      /*
       * TODO(cpovirk): Test forArray with ListIteratorTester (not just IteratorTester), including with
       * a start position other than 0.
       */
    
      public void testForEnumerationEmpty() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/IteratorsTest.java

          @Override
          protected Iterator<Integer> newTargetIterator() {
            return Iterators.forArray(1, 2, 3);
          }
        }.test();
      }
    
      /*
       * TODO(cpovirk): Test forArray with ListIteratorTester (not just IteratorTester), including with
       * a start position other than 0.
       */
    
      public void testForEnumerationEmpty() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java

              @Override
              public Iterator<V> iterator() {
                checkState(!calledIteratorAlready);
                calledIteratorAlready = true;
                return Iterators.forArray(v3());
              }
            };
    
        multimap().putAll(k3(), iterable);
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      public void testPutAllPropagatesToGet() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  5. 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);
      }
    
      @Override
      Object[] internalArray() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/OrderingTest.java

      }
    
      public void testLeastOfIterator_simple_negativeOne() {
        assertThrows(
            IllegalArgumentException.class,
            () -> numberOrdering.leastOf(Iterators.forArray(3, 4, 5, -1), -1));
      }
    
      public void testLeastOfIterable_singleton_0() {
        List<Integer> result = numberOrdering.leastOf(asList(3), 0);
        assertTrue(result instanceof RandomAccess);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/OrderingTest.java

      }
    
      public void testLeastOfIterator_simple_negativeOne() {
        assertThrows(
            IllegalArgumentException.class,
            () -> numberOrdering.leastOf(Iterators.forArray(3, 4, 5, -1), -1));
      }
    
      public void testLeastOfIterable_singleton_0() {
        List<Integer> result = numberOrdering.leastOf(asList(3), 0);
        assertTrue(result instanceof RandomAccess);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Iterators.java

       * {@link ImmutableList#copyOf(Object[])}}, or {@link ImmutableList#of}.
       */
      @SafeVarargs
      public static <T extends @Nullable Object> UnmodifiableIterator<T> forArray(T... array) {
        return forArrayWithPosition(array, 0);
      }
    
      /**
       * Returns a list iterator containing the elements in the specified {@code array} in order,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
Back to top