Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for orderedBy (0.13 sec)

  1. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

       */
      static final class InvertedMinMaxPriorityQueue<T> extends ForwardingQueue<T> {
        MinMaxPriorityQueue<T> mmHeap;
    
        public InvertedMinMaxPriorityQueue(Comparator<T> comparator) {
          mmHeap = MinMaxPriorityQueue.orderedBy(comparator).create();
        }
    
        @Override
        protected Queue<T> delegate() {
          return mmHeap;
        }
    
        @Override
        public @Nullable T poll() {
          return mmHeap.pollLast();
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/graph/EndpointPair.java

        this.nodeV = checkNotNull(nodeV);
      }
    
      /** Returns an {@link EndpointPair} representing the endpoints of a directed edge. */
      public static <N> EndpointPair<N> ordered(N source, N target) {
        return new Ordered<>(source, target);
      }
    
      /** Returns an {@link EndpointPair} representing the endpoints of an undirected edge. */
      public static <N> EndpointPair<N> unordered(N nodeU, N nodeV) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 01 17:18:04 UTC 2021
    - 8.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

                .putEdgeValue(1, 2, "1-2")
                .build();
    
        assertThat(graph.incidentEdges(2))
            .containsExactly(
                EndpointPair.ordered(2, 1), EndpointPair.ordered(2, 3), EndpointPair.ordered(1, 2))
            .inOrder();
      }
    
      @Test
      public void immutableValueGraphBuilder_incidentEdgeOrder_stable() {
        ImmutableValueGraph<Integer, String> graph =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

        assertThat(graph.nodes()).containsExactly("A", "B");
        assertThat(graph.edges()).containsExactly(EndpointPair.ordered("A", "B"));
      }
    
      @Test
      public void immutableGraphBuilder_putEdgeFromEndpointPair() {
        ImmutableGraph<String> graph =
            GraphBuilder.directed().<String>immutable().putEdge(EndpointPair.ordered("A", "B")).build();
    
        assertThat(graph.nodes()).containsExactly("A", "B");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 4.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

        assertThat(graph.nodes()).containsExactly("A", "B");
        assertThat(graph.edges()).containsExactly(EndpointPair.ordered("A", "B"));
      }
    
      @Test
      public void immutableGraphBuilder_putEdgeFromEndpointPair() {
        ImmutableGraph<String> graph =
            GraphBuilder.directed().<String>immutable().putEdge(EndpointPair.ordered("A", "B")).build();
    
        assertThat(graph.nodes()).containsExactly("A", "B");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 4.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

                .putEdgeValue(1, 2, "1-2")
                .build();
    
        assertThat(graph.incidentEdges(2))
            .containsExactly(
                EndpointPair.ordered(2, 1), EndpointPair.ordered(2, 3), EndpointPair.ordered(1, 2))
            .inOrder();
      }
    
      @Test
      public void immutableValueGraphBuilder_incidentEdgeOrder_stable() {
        ImmutableValueGraph<Integer, String> graph =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/ImmutableNetworkTest.java

        assertThat(network.incidentNodes(10)).isEqualTo(EndpointPair.ordered("A", "B"));
      }
    
      @Test
      public void immutableNetworkBuilder_putEdgeFromEndpointPair() {
        ImmutableNetwork<String, Integer> network =
            NetworkBuilder.directed()
                .<String, Integer>immutable()
                .addEdge(EndpointPair.ordered("A", "B"), 10)
                .build();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun May 05 18:02:35 UTC 2019
    - 5.5K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionForEachTester.java

      public void testForEachKnownOrder() {
        List<E> elements = new ArrayList<>();
        collection.forEach(elements::add);
        List<E> expected = Helpers.copyToList(getOrderedElements());
        assertEquals("Different ordered iteration", expected, elements);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/SortedIterable.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    interface SortedIterable<T extends @Nullable Object> extends Iterable<T> {
      /**
       * Returns the {@code Comparator} by which the elements of this iterable are ordered, or {@code
       * Ordering.natural()} if the elements are ordered by their natural ordering.
       */
      Comparator<? super T> comparator();
    
      /**
       * Returns an iterator over elements of type {@code T}. The elements are returned in nondecreasing
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 29 02:13:00 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/SortedIterable.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    interface SortedIterable<T extends @Nullable Object> extends Iterable<T> {
      /**
       * Returns the {@code Comparator} by which the elements of this iterable are ordered, or {@code
       * Ordering.natural()} if the elements are ordered by their natural ordering.
       */
      Comparator<? super T> comparator();
    
      /**
       * Returns an iterator over elements of type {@code T}. The elements are returned in nondecreasing
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 29 02:13:00 UTC 2021
    - 1.5K bytes
    - Viewed (0)
Back to top