Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 18 for onResultOf (0.05 seconds)

  1. android/guava-tests/test/com/google/common/base/EquivalenceTest.java

        EquivalenceTester.of(Equivalence.equals().onResultOf(Functions.toStringFunction()))
            .addEquivalenceGroup(new IntValue(1), new IntValue(1))
            .addEquivalenceGroup(new IntValue(2))
            .test();
      }
    
      public void testOnResultOf_equals() {
        new EqualsTester()
            .addEqualityGroup(
                Equivalence.identity().onResultOf(Functions.toStringFunction()),
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/collect/OrderingTest.java

                comparator, DECREASING_INTEGER.onResultOf(StringLengthFunction.STRING_LENGTH))
            .addEqualityGroup(DECREASING_INTEGER.onResultOf(Functions.constant(1)))
            .addEqualityGroup(Ordering.natural())
            .testEquals();
        reserializeAndAssert(comparator);
        assertThat(comparator.toString())
            .isEqualTo("Ordering.natural().reverse().onResultOf(STRING_LENGTH)");
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 43.2K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/collect/OrderingTest.java

                comparator, DECREASING_INTEGER.onResultOf(StringLengthFunction.STRING_LENGTH))
            .addEqualityGroup(DECREASING_INTEGER.onResultOf(Functions.constant(1)))
            .addEqualityGroup(Ordering.natural())
            .testEquals();
        reserializeAndAssert(comparator);
        assertThat(comparator.toString())
            .isEqualTo("Ordering.natural().reverse().onResultOf(STRING_LENGTH)");
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 43.2K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java

        BiPredicate<ImmutableSortedMap<String, Integer>, ImmutableSortedMap<String, Integer>>
            equivalence =
                Equivalence.equals()
                    .onResultOf(ImmutableSortedMap<String, Integer>::comparator)
                    .and(Equivalence.equals().onResultOf(map -> map.entrySet().asList()))
                    .and(Equivalence.equals());
        ImmutableSortedMap<String, Integer> expected =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 29.8K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/collect/Ordering.java

       *
       * {@snippet :
       * Ordering.from(String.CASE_INSENSITIVE_ORDER).onResultOf(Functions.toStringFunction())
       * }
       *
       * <p><b>Java 8+ users:</b> Use {@code Comparator.comparing(function, thisComparator)} instead
       * (you can omit the comparator if it is the natural order).
       */
      public <F extends @Nullable Object> Ordering<F> onResultOf(Function<F, ? extends T> function) {
        return new ByFunctionOrdering<>(function, this);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 39.4K bytes
    - Click Count (0)
  6. guava/src/com/google/common/collect/Ordering.java

       *
       * {@snippet :
       * Ordering.from(String.CASE_INSENSITIVE_ORDER).onResultOf(Functions.toStringFunction())
       * }
       *
       * <p><b>Java 8+ users:</b> Use {@code Comparator.comparing(function, thisComparator)} instead
       * (you can omit the comparator if it is the natural order).
       */
      public <F extends @Nullable Object> Ordering<F> onResultOf(Function<F, ? extends T> function) {
        return new ByFunctionOrdering<>(function, this);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 39.4K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            for (int i = 0; i < objectsNum; i++) {
              objects.add(new Object());
            }
    
            Iterable<?> locks = striped.bulkGet(objects);
            assertTrue(Ordering.natural().onResultOf(Functions.forMap(indexByLock)).isOrdered(locks));
    
            // check idempotency
            Iterable<?> locks2 = striped.bulkGet(objects);
            assertEquals(Lists.newArrayList(locks), Lists.newArrayList(locks2));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            for (int i = 0; i < objectsNum; i++) {
              objects.add(new Object());
            }
    
            Iterable<?> locks = striped.bulkGet(objects);
            assertTrue(Ordering.natural().onResultOf(Functions.forMap(indexByLock)).isOrdered(locks));
    
            // check idempotency
            Iterable<?> locks2 = striped.bulkGet(objects);
            assertEquals(Lists.newArrayList(locks), Lists.newArrayList(locks2));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

            toImmutableSetMultimap(Entry::getKey, Entry::getValue);
        BiPredicate<ImmutableSetMultimap<?, ?>, ImmutableSetMultimap<?, ?>> equivalence =
            Equivalence.equals()
                .onResultOf(
                    (ImmutableSetMultimap<?, ?> mm) ->
                        ImmutableListMultimap.copyOf(mm).asMap().entrySet().asList())
                .and(Equivalence.equals());
        CollectorTester.of(collector, equivalence)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 28.9K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

            toImmutableListMultimap(Entry::getKey, Entry::getValue);
        BiPredicate<ImmutableListMultimap<?, ?>, ImmutableListMultimap<?, ?>> equivalence =
            Equivalence.equals()
                .onResultOf((ImmutableListMultimap<?, ?> mm) -> mm.asMap().entrySet().asList())
                .and(Equivalence.equals());
        CollectorTester.of(collector, equivalence)
            .expectCollects(ImmutableListMultimap.of())
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 26.1K bytes
    - Click Count (0)
Back to Top