Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 214 for copyTo0 (0.08 seconds)

  1. android/guava/src/com/google/common/io/CharSource.java

       *       one with {@link CharSequence#charAt(int)}.
       *   <li>use {@link Appendable#append(CharSequence)} in {@link #copyTo(Appendable)} and {@link
       *       #copyTo(CharSink)}. We know this is correct since strings are immutable and so the length
       *       can't change, and it is faster because many writers and appendables are optimized for
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 25.7K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertFalse(out.closed());
        source.copyTo(out);
        assertFalse(out.closed());
      }
    
      public void testClosesOnErrors_copyingToByteSinkThatThrows() {
        for (TestOption option : EnumSet.of(OPEN_THROWS, WRITE_THROWS, CLOSE_THROWS)) {
          TestByteSource okSource = new TestByteSource(bytes);
          assertThrows(IOException.class, () -> okSource.copyTo(new TestByteSink(option)));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 15.6K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertFalse(out.closed());
        source.copyTo(out);
        assertFalse(out.closed());
      }
    
      public void testClosesOnErrors_copyingToByteSinkThatThrows() {
        for (TestOption option : EnumSet.of(OPEN_THROWS, WRITE_THROWS, CLOSE_THROWS)) {
          TestByteSource okSource = new TestByteSource(bytes);
          assertThrows(IOException.class, () -> okSource.copyTo(new TestByteSink(option)));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 15.6K bytes
    - Click Count (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java

      private ListGenerators() {}
    
      public static class ImmutableListOfGenerator extends TestStringListGenerator {
        @Override
        protected List<String> create(String[] elements) {
          return ImmutableList.copyOf(elements);
        }
      }
    
      public static class BuilderAddListGenerator extends TestStringListGenerator {
        @Override
        protected List<String> create(String[] elements) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        String[] array = new String[0];
        Multiset<String> multiset = ImmutableMultiset.copyOf(array);
        assertTrue(multiset.isEmpty());
      }
    
      public void testCreation_arrayOfOneElement() {
        String[] array = new String[] {"a"};
        Multiset<String> multiset = ImmutableMultiset.copyOf(array);
        assertEquals(HashMultiset.create(asList("a")), multiset);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 20.8K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

         */
        assertThat(ImmutableIntArray.copyOf(new int[0])).isSameInstanceAs(ImmutableIntArray.of());
      }
    
      public void testCopyOf_array_nonempty() {
        int[] array = new int[] {0, 1, 3};
        ImmutableIntArray iia = ImmutableIntArray.copyOf(array);
        array[2] = 2;
        assertThat(iia.asList()).containsExactly(0, 1, 3).inOrder();
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 12 14:49:24 GMT 2025
    - 20.6K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java

      public void testCopyOf_map_empty() {
        Map<Class<?>, Object> in = emptyMap();
        ClassToInstanceMap<Object> map = ImmutableClassToInstanceMap.copyOf(in);
        assertTrue(map.isEmpty());
        assertThat(map).isSameInstanceAs(ImmutableClassToInstanceMap.of());
        assertThat(ImmutableClassToInstanceMap.copyOf(map)).isSameInstanceAs(map);
      }
    
      public void testOf_zero() {
        assertTrue(ImmutableClassToInstanceMap.of().isEmpty());
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 31 20:00:15 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

      }
    
      public void testCopyOf_arrayContainingOnlyNull() {
        @Nullable String[] array = new @Nullable String[] {null};
        assertThrows(NullPointerException.class, () -> ImmutableList.copyOf((String[]) array));
      }
    
      public void testCopyOf_collection_empty() {
        Collection<String> c = MinimalCollection.of();
        List<String> list = ImmutableList.copyOf(c);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 24.4K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

      protected abstract <E extends Comparable<? super E>> Set<E> copyOf(E[] elements);
    
      protected abstract <E extends Comparable<? super E>> Set<E> copyOf(
          Collection<? extends E> elements);
    
      protected abstract <E extends Comparable<? super E>> Set<E> copyOf(
          Iterable<? extends E> elements);
    
      protected abstract <E extends Comparable<? super E>> Set<E> copyOf(
          Iterator<? extends E> elements);
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 18.5K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java

            ImmutableBiMap.copyOf(Collections.<String, Integer>emptyMap());
        assertEquals(Collections.<String, Integer>emptyMap(), copy);
        assertThat(ImmutableBiMap.copyOf(copy)).isSameInstanceAs(copy);
        assertThat(copy).isSameInstanceAs(ImmutableBiMap.of());
      }
    
      public void testCopyOfSingletonMap() {
        ImmutableBiMap<String, Integer> copy = ImmutableBiMap.copyOf(singletonMap("one", 1));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 21.4K bytes
    - Click Count (0)
Back to Top