Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for cycle (0.13 sec)

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

          assertTrue(cycle.hasNext());
          assertEquals("b", cycle.next());
        }
      }
    
      public void testCycleOfTwoWithRemove() {
        Iterable<String> iterable = Lists.newArrayList("a", "b");
        Iterator<String> cycle = Iterators.cycle(iterable);
        assertTrue(cycle.hasNext());
        assertEquals("a", cycle.next());
        assertTrue(cycle.hasNext());
        assertEquals("b", cycle.next());
        assertTrue(cycle.hasNext());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     *       verified or created.
     *   <li>If a new edge needs to be created, the outgoing edges of the acquired locks are traversed
     *       to check for a cycle that reaches the lock to be acquired. If no cycle is detected, a new
     *       "safe" edge is created.
     *   <li>If a cycle is detected, an "unsafe" (cyclic) edge is created to represent a potential
     *       deadlock situation, and the appropriate Policy is executed.
     * </ul>
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/graph/TraverserTest.java

          createDirectedGraph("aa", "dd", "ab", "ac", "ca", "cd", "bd");
    
      /** A directed graph with a single cycle: a -> b -> c -> d -> a. */
      private static final SuccessorsFunction<Character> CYCLE_GRAPH =
          createDirectedGraph("ab", "bc", "cd", "da");
    
      /**
       * Same as {@link #CYCLE_GRAPH}, but with an extra a->c edge.
       *
       * <pre>{@code
       * |--------------|
       * v              |
       * a -> b -> c -> d
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 47.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Iterables.java

          @Override
          public Iterator<T> iterator() {
            return Iterators.cycle(iterable);
          }
    
          @Override
          public String toString() {
            return iterable.toString() + " (cycled)";
          }
        };
      }
    
      /**
       * Returns an iterable whose iterators cycle indefinitely over the provided elements.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  5. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 06 17:32:08 GMT 2023
    - 30.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/reflect/TypeResolver.java

          }
          // First, check whether var -> arg forms a cycle
          for (Type t = arg; t != null; t = mappings.get(TypeVariableKey.forLookup(t))) {
            if (var.equalsType(t)) {
              // cycle detected, remove the entire cycle from the mapping so that
              // each type variable resolves deterministically to itself.
              // Otherwise, an F -> T cycle will end up resolving both F and T
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 24.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

          assertTrue(cycle.hasNext());
          assertEquals("b", cycle.next());
        }
      }
    
      public void testCycleOfTwoWithRemove() {
        Iterable<String> iterable = Lists.newArrayList("a", "b");
        Iterator<String> cycle = Iterators.cycle(iterable);
        assertTrue(cycle.hasNext());
        assertEquals("a", cycle.next());
        assertTrue(cycle.hasNext());
        assertEquals("b", cycle.next());
        assertTrue(cycle.hasNext());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 56.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/graph/TraverserTest.java

          createDirectedGraph("aa", "dd", "ab", "ac", "ca", "cd", "bd");
    
      /** A directed graph with a single cycle: a -> b -> c -> d -> a. */
      private static final SuccessorsFunction<Character> CYCLE_GRAPH =
          createDirectedGraph("ab", "bc", "cd", "da");
    
      /**
       * Same as {@link #CYCLE_GRAPH}, but with an extra a->c edge.
       *
       * <pre>{@code
       * |--------------|
       * v              |
       * a -> b -> c -> d
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 47.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/CharSourceTest.java

      }
    
      public void testConcat_infiniteIterable() throws IOException {
        CharSource source = CharSource.wrap("abcd");
        Iterable<CharSource> cycle = Iterables.cycle(ImmutableList.of(source));
        CharSource concatenated = CharSource.concat(cycle);
    
        String expected = "abcdabcd";
    
        // read the first 8 chars manually, since there's no equivalent to ByteSource.slice
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

      }
    
      public void testConcat_infiniteIterable() throws IOException {
        ByteSource source = ByteSource.wrap(new byte[] {0, 1, 2, 3});
        Iterable<ByteSource> cycle = Iterables.cycle(ImmutableList.of(source));
        ByteSource concatenated = ByteSource.concat(cycle);
    
        byte[] expected = {0, 1, 2, 3, 0, 1, 2, 3};
        assertArrayEquals(expected, concatenated.slice(0, 8).read());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
Back to top