Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 279 for apply (0.34 sec)

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

        Predicate<String> post = SerializableTester.reserializeAndAssert(pre);
        assertEquals(pre.apply("foo"), post.apply("foo"));
        assertEquals(pre.apply(null), post.apply(null));
      }
    
      public void testNotNull_apply() {
        Predicate<@Nullable Integer> notNull = Predicates.notNull();
        assertFalse(notNull.apply(null));
        assertTrue(notNull.apply(1));
      }
    
      public void testNotNull_equality() {
        new EqualsTester()
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 32.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Predicates.java

        private CompositionPredicate(Predicate<B> p, Function<A, ? extends B> f) {
          this.p = checkNotNull(p);
          this.f = checkNotNull(f);
        }
    
        @Override
        public boolean apply(@ParametricNullness A a) {
          return p.apply(f.apply(a));
        }
    
        @Override
        public boolean equals(@CheckForNull Object obj) {
          if (obj instanceof CompositionPredicate) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/FilteredCollectionsTestUtil.java

              C filtered = filter(createUnfiltered(contents), EVEN);
              try {
                assertEquals(expectedResult, filtered.add(toAdd));
                assertTrue(EVEN.apply(toAdd));
              } catch (IllegalArgumentException e) {
                assertFalse(EVEN.apply(toAdd));
              }
            }
          }
        }
    
        public void testRemove() {
          for (List<Integer> contents : SAMPLE_INPUTS) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Function.java

       *       Objects.equal}{@code (a, b)} implies that {@code Objects.equal(function.apply(a),
       *       function.apply(b))}.
       * </ul>
       *
       * @throws NullPointerException if {@code input} is null and this function does not accept null
       *     arguments
       */
      @ParametricNullness
      T apply(@ParametricNullness F input);
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 01:41:50 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/MapsCollectionTest.java

          new Predicate<String>() {
            @Override
            public boolean apply(@Nullable String string) {
              return !"banana".equals(string) && !"eggplant".equals(string);
            }
          };
    
      static final Predicate<String> FILTER_VALUES =
          new Predicate<String>() {
            @Override
            public boolean apply(@Nullable String string) {
              return !"toast".equals(string) && !"spam".equals(string);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 32.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ByFunctionOrdering.java

        this.ordering = checkNotNull(ordering);
      }
    
      @Override
      public int compare(@ParametricNullness F left, @ParametricNullness F right) {
        return ordering.compare(function.apply(left), function.apply(right));
      }
    
      @Override
      public boolean equals(@CheckForNull Object object) {
        if (object == this) {
          return true;
        }
        if (object instanceof ByFunctionOrdering) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun Jun 20 14:22:42 GMT 2021
    - 2.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

        ListenableFuture<? extends V> doFallback(
            AsyncFunction<? super X, ? extends V> fallback, X cause) throws Exception {
          ListenableFuture<? extends V> replacement = fallback.apply(cause);
          checkNotNull(
              replacement,
              "AsyncFunction.apply returned null instead of a Future. "
                  + "Did you mean to return immediateFuture(null)? %s",
              fallback);
          return replacement;
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/FluentIterableTest.java

        assertThat(iterable.firstMatch(Predicates.alwaysTrue())).hasValue("cool");
      }
    
      private static final class IntegerValueOfFunction implements Function<String, Integer> {
        @Override
        public Integer apply(String from) {
          return Integer.valueOf(from);
        }
      }
    
      public void testTransformWith() {
        List<String> input = asList("1", "2", "3");
    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)
  9. guava/src/com/google/common/base/Equivalence.java

       * non-null objects {@code x} and {@code y}, {@code equivalence.onResultOf(function).equivalent(a,
       * b)} is true if and only if {@code equivalence.equivalent(function.apply(a), function.apply(b))}
       * is true.
       *
       * <p>For example:
       *
       * <pre>{@code
       * Equivalence<Person> SAME_AGE = Equivalence.equals().onResultOf(GET_PERSON_AGE);
       * }</pre>
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/base/Equivalence.java

       * non-null objects {@code x} and {@code y}, {@code equivalence.onResultOf(function).equivalent(a,
       * b)} is true if and only if {@code equivalence.equivalent(function.apply(a), function.apply(b))}
       * is true.
       *
       * <p>For example:
       *
       * <pre>{@code
       * Equivalence<Person> SAME_AGE = Equivalence.equals().onResultOf(GET_PERSON_AGE);
       * }</pre>
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 01:41:50 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top