- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 43 for cycle (0.16 sec)
-
android/guava-tests/test/com/google/common/collect/IterablesTest.java
assertEquals(expected, actual); } // Far less exhaustive than the tests in IteratorsTest public void testCycle() { Iterable<String> cycle = Iterables.cycle("a", "b"); int howManyChecked = 0; for (String string : cycle) { String expected = (howManyChecked % 2 == 0) ? "a" : "b"; assertEquals(expected, string); if (howManyChecked++ == 5) { break; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 46K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/Helpers.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Feb 26 19:46:10 GMT 2024 - 17.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterators.java
* should use an explicit {@code break} or be certain that you will eventually remove all the * elements. */ @SafeVarargs public static <T extends @Nullable Object> Iterator<T> cycle(T... elements) { return cycle(Lists.newArrayList(elements)); } /** * Returns an Iterator that walks the specified array, nulling out elements behind it. This can
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Tue Jan 30 00:14:39 GMT 2024 - 50.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java
stimuli = (Stimulus<E, ? super I>[]) new Stimulus<?, ?>[steps]; if (!elementsToInsertIterable.iterator().hasNext()) { throw new IllegalArgumentException(); } elementsToInsert = Helpers.cycle(elementsToInsertIterable); this.features = Helpers.copyToSet(features); this.expectedElements = Helpers.copyToList(expectedElements); this.knownOrder = knownOrder; this.startIndex = startIndex; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 20.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/FluentIterable.java
* use {@code Stream.generate(() -> collection).flatMap(Collection::stream)}. */ public final FluentIterable<E> cycle() { return from(Iterables.cycle(getDelegate())); } /** * Returns a fluent iterable whose iterators traverse first the elements of this fluent iterable,
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Tue Jan 30 00:14:39 GMT 2024 - 35.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/ClassPathTest.java
public void testScanDirectory_symlinkCycle() throws IOException { if (isWindows()) { return; // TODO: b/136041958 - Can we detect cycles under Windows? } ClassLoader loader = ClassPathTest.class.getClassLoader(); // directory with a cycle, // /root // /left // /[sibling -> right] // /right // /[sibling -> left]
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Jul 10 17:06:37 GMT 2023 - 27.7K bytes - Viewed (0) -
android/guava/src/com/google/common/graph/Graphs.java
// Graph query methods /** * Returns true if {@code graph} has at least one cycle. A cycle is defined as a non-empty subset * of edges in a graph arranged to form a path (a sequence of adjacent outgoing edges) starting * and ending with the same node. * * <p>This method will detect any non-empty cycle, including self-loops (a cycle of length 1). */ public static <N> boolean hasCycle(Graph<N> graph) {
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) -
guava-tests/test/com/google/common/collect/FluentIterableTest.java
// always point to "a". assertEquals("a", cycle.iterator().next()); } public void testCycle_emptyIterable() { FluentIterable<Integer> cycle = FluentIterable.<Integer>of().cycle(); assertFalse(cycle.iterator().hasNext()); } public void testCycle_removingAllElementsStopsCycle() { FluentIterable<Integer> cycle = fluent(1, 2).cycle(); Iterator<Integer> iterator = cycle.iterator();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 06 18:35:19 GMT 2024 - 31.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
} public void testSetIndirectSelf_toString() { final SettableFuture<Object> orig = SettableFuture.create(); // unlike the above this indirection defeats the trivial cycle detection and causes a SOE orig.setFuture( new ForwardingListenableFuture<Object>() { @Override protected ListenableFuture<Object> delegate() { return orig; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 46.8K bytes - Viewed (0)