Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ofInstance (0.12 sec)

  1. guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // threads
      public void testRenaming() throws Exception {
        String oldName = Thread.currentThread().getName();
        final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName");
        Callable<@Nullable Void> callable =
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/base/SuppliersTest.java

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

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

      }
    
      @SuppressWarnings("ReturnValueIgnored")
      public void testMaximumWeight_withoutWeigher() {
        CacheBuilder<Object, Object> builder = CacheBuilder.from(parse("maximumWeight=9000"));
        assertThrows(
            IllegalStateException.class,
            () -> builder.build(CacheLoader.from(Suppliers.ofInstance(null))));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/OptionalTest.java

        assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback")));
      }
    
      public void testOr_supplier_absent() {
        assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback")));
      }
    
      public void testOr_nullSupplier_absent() {
        Supplier<Object> nullSupplier = (Supplier<Object>) Suppliers.<@Nullable Object>ofInstance(null);
        Optional<Object> absentOptional = Optional.absent();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

      }
    
      @SuppressWarnings("ReturnValueIgnored")
      public void testMaximumWeight_withoutWeigher() {
        CacheBuilder<Object, Object> builder = CacheBuilder.from(parse("maximumWeight=9000"));
        assertThrows(
            IllegalStateException.class,
            () -> builder.build(CacheLoader.from(Suppliers.ofInstance(null))));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      }
    
      public void testThreadRenaming() {
        Executor renamingExecutor =
            renamingDecorator(newDirectExecutorService(), Suppliers.ofInstance("FooBar"));
        String oldName = Thread.currentThread().getName();
        renamingExecutor.execute(
            new Runnable() {
              @Override
              public void run() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      }
    
      public void testThreadRenaming() {
        Executor renamingExecutor =
            renamingDecorator(newDirectExecutorService(), Suppliers.ofInstance("FooBar"));
        String oldName = Thread.currentThread().getName();
        renamingExecutor.execute(
            new Runnable() {
              @Override
              public void run() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/CacheBuilder.java

      @SuppressWarnings("GoodTime") // should be a Duration
      private static final int DEFAULT_REFRESH_NANOS = 0;
    
      static final Supplier<? extends StatsCounter> NULL_STATS_COUNTER =
          Suppliers.ofInstance(
              new StatsCounter() {
                @Override
                public void recordHits(int count) {}
    
                @Override
                public void recordMisses(int count) {}
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/CacheBuilder.java

      @SuppressWarnings("GoodTime") // should be a Duration
      private static final int DEFAULT_REFRESH_NANOS = 0;
    
      static final Supplier<? extends StatsCounter> NULL_STATS_COUNTER =
          Suppliers.ofInstance(
              new StatsCounter() {
                @Override
                public void recordHits(int count) {}
    
                @Override
                public void recordMisses(int count) {}
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top