Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for aConstant (0.1 sec)

  1. android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

          return count.get();
        }
      }
    
      static final class ConstantLoader<K, V> extends CacheLoader<K, V> {
        private final V constant;
    
        ConstantLoader(V constant) {
          this.constant = constant;
        }
    
        @Override
        public V load(K key) {
          return constant;
        }
      }
    
      /**
       * Returns a {@code new Object()} for every request, and increments a counter for every request.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/net/MediaTypeTest.java

        for (MediaType constant : getConstants()) {
          assertSame(constant, MediaType.parse(constant.toString()));
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // reflection
      public void testCreate_useConstants() throws Exception {
        for (MediaType constant : getConstants()) {
          assertSame(
              constant,
              MediaType.create(constant.type(), constant.subtype())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/CharMatcher.java

       *                            8
       */
    
      // Constant matcher factory methods
    
      /**
       * Matches any character.
       *
       * @since 19.0 (since 1.0 as constant {@code ANY})
       */
      public static CharMatcher any() {
        return Any.INSTANCE;
      }
    
      /**
       * Matches no characters.
       *
       * @since 19.0 (since 1.0 as constant {@code NONE})
       */
      public static CharMatcher none() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        new EqualsTester()
            .addEqualityGroup(
                Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo")),
                Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo")))
            .addEqualityGroup(Suppliers.compose(Functions.constant(2), Suppliers.ofInstance("foo")))
            .addEqualityGroup(Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("bar")))
            .testEquals();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/SuppliersTest.java

        new EqualsTester()
            .addEqualityGroup(
                Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo")),
                Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo")))
            .addEqualityGroup(Suppliers.compose(Functions.constant(2), Suppliers.ofInstance("foo")))
            .addEqualityGroup(Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("bar")))
            .testEquals();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

            if (field.getGenericType() == field.getType() && type.isAssignableFrom(field.getType())) {
              field.setAccessible(true);
              try {
                T constant = type.cast(field.get(null));
                if (constant != null) {
                  return constant;
                }
              } catch (IllegalAccessException impossible) {
                throw new AssertionError(impossible);
              }
            }
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

            if (field.getGenericType() == field.getType() && type.isAssignableFrom(field.getType())) {
              field.setAccessible(true);
              try {
                T constant = type.cast(field.get(null));
                if (constant != null) {
                  return constant;
                }
              } catch (IllegalAccessException impossible) {
                throw new AssertionError(impossible);
              }
            }
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

     *
     * <p>Parameters for the benchmark are:
     *
     * <ul>
     *   <li>size: The length of the byte array to hash.
     * </ul>
     *
     * @author Colin Decker
     */
    public class ChecksumBenchmark {
    
      // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons.
      private static final int RANDOM_SEED = new Random().nextInt();
    
      @Param({"10", "1000", "100000", "1000000"})
      private int size;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 16:53:43 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. compat/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java

            SimpleProblemCollector result = validateRaw("raw-model/bad-ci-friendly.xml");
            assertViolations(result, 0, 0, 1);
            assertEquals(
                    "'version' contains an expression but should be a constant.",
                    result.getWarnings().get(0));
        }
    
        @Test
        void testCiFriendlyBadSha1Plus() throws Exception {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 32.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

      }
    
      public void testToMap_nullKey() {
        assertThrows(
            NullPointerException.class, () -> fluent(1, null, 2).toMap(Functions.constant("foo")));
      }
    
      public void testToMap_nullValue() {
        assertThrows(NullPointerException.class, () -> fluent(1, 2, 3).toMap(Functions.constant(null)));
      }
    
      public void testIndex() {
        ImmutableListMultimap<Integer, String> expected =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 30.4K bytes
    - Viewed (0)
Back to top