- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 2,791 for copy (0.52 sec)
-
android/guava-tests/benchmark/com/google/common/collect/ComparatorDelegationOverheadBenchmark.java
Integer[] copy = inputArrays[i & 0xFF].clone(); Arrays.sort(copy); tmp += copy[0]; } return tmp; } @Benchmark int arraysSortOrderingNatural(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { Integer[] copy = inputArrays[i & 0xFF].clone(); Arrays.sort(copy, Ordering.natural()); tmp += copy[0]; } return tmp; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java
ImmutableSortedMap<String, Integer> copy = ImmutableSortedMap.copyOf(Collections.<String, Integer>emptyMap()); assertEquals(Collections.<String, Integer>emptyMap(), copy); assertSame(copy, ImmutableSortedMap.copyOf(copy)); assertSame(Ordering.natural(), copy.comparator()); } public void testCopyOfSingletonMap() { ImmutableSortedMap<String, Integer> copy =
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 27K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ArrayTableTest.java
original.put("foo", 3, 'c'); Table<String, Integer, @Nullable Character> copy = ArrayTable.create(original); assertEquals(4, copy.size()); assertEquals((Character) 'a', copy.get("foo", 1)); assertEquals((Character) 'b', copy.get("bar", 1)); assertEquals((Character) 'c', copy.get("foo", 3)); assertNull(copy.get("bar", 3)); original.put("foo", 1, 'd');
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Mar 04 16:54:11 GMT 2024 - 17.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ArrayTableTest.java
original.put("foo", 3, 'c'); Table<String, Integer, @Nullable Character> copy = ArrayTable.create(original); assertEquals(4, copy.size()); assertEquals((Character) 'a', copy.get("foo", 1)); assertEquals((Character) 'b', copy.get("bar", 1)); assertEquals((Character) 'c', copy.get("foo", 3)); assertNull(copy.get("bar", 3)); original.put("foo", 1, 'd');
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Mar 04 16:54:11 GMT 2024 - 17.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java
if (mutable) { for (int i = 0; i < reps; i++) { List<Integer> copy = new ArrayList<>(input); Collections.sort(copy); dummy += copy.get(0); } } else { for (int i = 0; i < reps; i++) { List<Integer> copy = new ArrayList<>(input); Collections.sort(copy); dummy += ImmutableList.copyOf(copy).get(0); } } return dummy; } @Benchmark
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.5K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/CharEscaper.java
} lastEscape = index + 1; } // Copy leftover characters if there are any. int charsLeft = slen - lastEscape; if (charsLeft > 0) { int sizeNeeded = destIndex + charsLeft; if (destSize < sizeNeeded) { // Regrow and copy, expensive! No padding as this is the final copy. dest = growBuffer(dest, destIndex, sizeNeeded); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Jan 18 20:55:09 GMT 2022 - 6.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/EvictingQueueTest.java
original.add("two"); original.add("three"); EvictingQueue<String> copy = SerializableTester.reserialize(original); assertEquals(copy.maxSize, original.maxSize); assertEquals("one", copy.remove()); assertEquals("two", copy.remove()); assertEquals("three", copy.remove()); assertTrue(copy.isEmpty()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 6.7K bytes - Viewed (0) -
android/guava/src/com/google/common/graph/Graphs.java
} /** Creates a mutable copy of {@code graph} with the same nodes and edges. */ public static <N> MutableGraph<N> copyOf(Graph<N> graph) { MutableGraph<N> copy = GraphBuilder.from(graph).expectedNodeCount(graph.nodes().size()).build(); for (N node : graph.nodes()) { copy.addNode(node); } for (EndpointPair<N> edge : graph.edges()) { copy.putEdge(edge.nodeU(), edge.nodeV()); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 21.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableTableTest.java
} private static <R, C, V> void validateViewOrdering(Table<R, C, V> original, Table<R, C, V> copy) { assertThat(copy.cellSet()).containsExactlyElementsIn(original.cellSet()).inOrder(); assertThat(copy.rowKeySet()).containsExactlyElementsIn(original.rowKeySet()).inOrder(); assertThat(copy.values()).containsExactlyElementsIn(original.values()).inOrder(); } public void testCopyOf() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Mar 04 16:54:11 GMT 2024 - 19.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/graph/GraphsTest.java
Graph<Integer> directedGraph = buildDirectedGraph(); Graph<Integer> copy = copyOf(directedGraph); assertThat(copy).isEqualTo(directedGraph); } @Test public void copyOf_undirectedGraph() { Graph<Integer> undirectedGraph = buildUndirectedGraph(); Graph<Integer> copy = copyOf(undirectedGraph); assertThat(copy).isEqualTo(undirectedGraph); } @Test
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 24.9K bytes - Viewed (0)