- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 420 for copyTo0 (0.13 seconds)
-
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) -
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) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
return ImmutableSortedSet.copyOf(elements); } } public static class ImmutableSortedSetHeadsetGenerator extends TestStringSortedSetGenerator { @Override protected SortedSet<String> create(String[] elements) { List<String> list = Lists.newArrayList(elements); list.add("zzz"); return ImmutableSortedSet.copyOf(list).headSet("zzy"); } }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
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) -
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) -
guava/src/com/google/common/collect/ImmutableSortedMultiset.java
* ImmutableSortedMultiset#copyOf(Comparable[])}.</b> */ @DoNotCall("Elements must be Comparable. (Or, pass a Comparator to orderedBy or copyOf.)") @Deprecated // The usage of "Z" here works around bugs in Javadoc (JDK-8318093) and JDiff. public static <Z> ImmutableSortedMultiset<Z> copyOf(Z[] elements) { throw new UnsupportedOperationException(); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 29.5K bytes - Click Count (0) -
guava/src/com/google/common/collect/RegularImmutableTable.java
ImmutableList<Cell<R, C, V>> cellList = ImmutableList.copyOf(cells); for (Cell<R, C, V> cell : cells) { rowSpaceBuilder.add(cell.getRowKey()); columnSpaceBuilder.add(cell.getColumnKey()); } ImmutableSet<R> rowSpace = (rowComparator == null) ? ImmutableSet.copyOf(rowSpaceBuilder) : ImmutableSet.copyOf(ImmutableList.sortedCopyOf(rowComparator, rowSpaceBuilder));
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 7K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableSet.java
* is unnecessary; for example, {@code copyOf(copyOf(anArrayList))} should copy the data only * once. This reduces the expense of habitually making defensive copies at API boundaries. * However, the precise conditions for skipping the copy operation are undefined. * * @throws NullPointerException if any of {@code elements} is null */ public static <E> ImmutableSet<E> copyOf(Iterable<? extends E> elements) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Oct 11 14:54:00 GMT 2025 - 22.4K bytes - Click Count (0) -
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 - 24.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java
String[] array = new String[0]; Multiset<String> multiset = ImmutableSortedMultiset.copyOf(array); assertTrue(multiset.isEmpty()); } public void testCreation_arrayOfOneElement() { String[] array = new String[] {"a"}; Multiset<String> multiset = ImmutableSortedMultiset.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 - 22.8K bytes - Click Count (0)