Home
last modified time | relevance | path

Searched refs:getIfPresent (Results 1 – 18 of 18) sorted by relevance

/external/guava/guava-tests/test/com/google/common/cache/
DCacheBuilderGwtTest.java94 assertEquals(null, cache.getIfPresent(10)); in testSizeConstraint()
96 assertEquals(Integer.valueOf(20), cache.getIfPresent(2)); in testSizeConstraint()
97 assertEquals(Integer.valueOf(30), cache.getIfPresent(3)); in testSizeConstraint()
98 assertEquals(Integer.valueOf(40), cache.getIfPresent(4)); in testSizeConstraint()
99 assertEquals(Integer.valueOf(50), cache.getIfPresent(5)); in testSizeConstraint()
102 assertEquals(Integer.valueOf(10), cache.getIfPresent(1)); in testSizeConstraint()
103 assertEquals(Integer.valueOf(30), cache.getIfPresent(3)); in testSizeConstraint()
104 assertEquals(Integer.valueOf(40), cache.getIfPresent(4)); in testSizeConstraint()
105 assertEquals(Integer.valueOf(50), cache.getIfPresent(5)); in testSizeConstraint()
106 assertEquals(null, cache.getIfPresent(2)); in testSizeConstraint()
[all …]
DAbstractCacheTest.java41 public Object getIfPresent(Object key) { in testGetIfPresent()
46 assertNull(cache.getIfPresent(new Object())); in testGetIfPresent()
50 assertSame(newValue, cache.getIfPresent(new Object())); in testGetIfPresent()
56 public Object getIfPresent(Object key) { in testGetAllPresent_empty()
71 public Object getIfPresent(Object key) { in testGetAllPresent_cached()
85 public Integer getIfPresent(Object key) { in testInvalidateAll()
DCacheManualTest.java40 assertNull(cache.getIfPresent(one)); in testGetIfPresent()
50 assertNull(cache.getIfPresent(two)); in testGetIfPresent()
62 assertSame(two, cache.getIfPresent(one)); in testGetIfPresent()
72 assertNull(cache.getIfPresent(two)); in testGetIfPresent()
84 assertSame(two, cache.getIfPresent(one)); in testGetIfPresent()
94 assertSame(one, cache.getIfPresent(two)); in testGetIfPresent()
DAbstractLoadingCacheTest.java48 public Object getIfPresent(Object key) { in testGetUnchecked_checked()
79 public Object getIfPresent(Object key) { in testGetUnchecked_unchecked()
110 public Object getIfPresent(Object key) { in testGetUnchecked_error()
141 public Object getIfPresent(Object key) { in testGetUnchecked_otherThrowable()
DForwardingCacheTest.java57 expect(mock.getIfPresent("key")).andReturn(Boolean.TRUE); in testGetIfPresent()
59 assertSame(Boolean.TRUE, forward.getIfPresent("key")); in testGetIfPresent()
DCacheLoadingTest.java304 assertSame(one, cache.getIfPresent(key)); in testRefresh_getIfPresent()
312 assertSame(two, cache.getIfPresent(key)); in testRefresh_getIfPresent()
320 assertSame(two, cache.getIfPresent(key)); in testRefresh_getIfPresent()
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/
DEnumsTest.java44 assertEquals(Optional.of(TestEnum.CHEETO), Enums.getIfPresent(TestEnum.class, "CHEETO")); in testGetIfPresent()
45 assertEquals(Optional.of(TestEnum.HONDA), Enums.getIfPresent(TestEnum.class, "HONDA")); in testGetIfPresent()
46 assertEquals(Optional.of(TestEnum.POODLE), Enums.getIfPresent(TestEnum.class, "POODLE")); in testGetIfPresent()
48 assertTrue(Enums.getIfPresent(TestEnum.class, "CHEETO").isPresent()); in testGetIfPresent()
49 assertTrue(Enums.getIfPresent(TestEnum.class, "HONDA").isPresent()); in testGetIfPresent()
50 assertTrue(Enums.getIfPresent(TestEnum.class, "POODLE").isPresent()); in testGetIfPresent()
52 assertEquals(TestEnum.CHEETO, Enums.getIfPresent(TestEnum.class, "CHEETO").get()); in testGetIfPresent()
53 assertEquals(TestEnum.HONDA, Enums.getIfPresent(TestEnum.class, "HONDA").get()); in testGetIfPresent()
54 assertEquals(TestEnum.POODLE, Enums.getIfPresent(TestEnum.class, "POODLE").get()); in testGetIfPresent()
58 assertFalse(Enums.getIfPresent(TestEnum.class, "cHEETO").isPresent()); in testGetIfPresent_caseSensitive()
[all …]
/external/guava/guava-tests/test/com/google/common/base/
DEnumsTest.java53 assertEquals(Optional.of(TestEnum.CHEETO), Enums.getIfPresent(TestEnum.class, "CHEETO")); in testGetIfPresent()
54 assertEquals(Optional.of(TestEnum.HONDA), Enums.getIfPresent(TestEnum.class, "HONDA")); in testGetIfPresent()
55 assertEquals(Optional.of(TestEnum.POODLE), Enums.getIfPresent(TestEnum.class, "POODLE")); in testGetIfPresent()
57 assertTrue(Enums.getIfPresent(TestEnum.class, "CHEETO").isPresent()); in testGetIfPresent()
58 assertTrue(Enums.getIfPresent(TestEnum.class, "HONDA").isPresent()); in testGetIfPresent()
59 assertTrue(Enums.getIfPresent(TestEnum.class, "POODLE").isPresent()); in testGetIfPresent()
61 assertEquals(TestEnum.CHEETO, Enums.getIfPresent(TestEnum.class, "CHEETO").get()); in testGetIfPresent()
62 assertEquals(TestEnum.HONDA, Enums.getIfPresent(TestEnum.class, "HONDA").get()); in testGetIfPresent()
63 assertEquals(TestEnum.POODLE, Enums.getIfPresent(TestEnum.class, "POODLE").get()); in testGetIfPresent()
67 assertFalse(Enums.getIfPresent(TestEnum.class, "cHEETO").isPresent()); in testGetIfPresent_caseSensitive()
[all …]
/external/guava/guava-tests/benchmark/com/google/common/cache/
DMapMakerComparisonBenchmark.java83 cache.getIfPresent(TEST_KEY); in cacheBuilder_stats()
89 cacheNoStats.getIfPresent(TEST_KEY); in cacheBuilder()
/external/guava/guava/src/com/google/common/cache/
DForwardingCache.java53 public V getIfPresent(Object key) { in getIfPresent() method in ForwardingCache
54 return delegate().getIfPresent(key); in getIfPresent()
DCache.java59 V getIfPresent(Object key); in getIfPresent() method
DAbstractCache.java74 V value = getIfPresent(key); in getAllPresent()
DLocalCache.java3924 public V getIfPresent(Object key) {
4732 public V getIfPresent(Object key) {
4733 return localCache.getIfPresent(key);
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/
DEnums.java49 public static <T extends Enum<T>> Optional<T> getIfPresent( in getIfPresent() method in Enums
/external/guava/guava/src/com/google/common/base/
DEnums.java73 public static <T extends Enum<T>> Optional<T> getIfPresent( in getIfPresent() method in Enums
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/
DLocalCache.java279 private V getIfPresent(Object key) { in getIfPresent() method in LocalCache
379 public V getIfPresent(Object key) { in getIfPresent() method in LocalCache.LocalManualCache
380 return localCache.getIfPresent(key); in getIfPresent()
/external/guice/core/src/com/google/inject/internal/
DWeakKeySet.java109 Set<KeyAndSource> keyAndSources = evictionCache.getIfPresent(state); in add()
/external/guava/guava-tests/benchmark/com/google/common/base/
DEnumsBenchmark.java68 void getIfPresent(int repetitions) { in getIfPresent() method in EnumsBenchmark
70 Enums.getIfPresent(enumType, sampleData[i & 255]); in getIfPresent()