Home
last modified time | relevance | path

Searched refs:backingMap (Results 1 – 25 of 48) sorted by relevance

12

/external/guava/android/guava/src/com/google/common/collect/
DAbstractMapBasedMultiset.java48 transient ObjectCountHashMap<E> backingMap; field in AbstractMapBasedMultiset
59 return backingMap.get(element); in count()
77 int entryIndex = backingMap.indexOf(element); in add()
79 backingMap.put(element, occurrences); in add()
83 int oldCount = backingMap.getValue(entryIndex); in add()
86 backingMap.setValue(entryIndex, (int) newCount); in add()
98 int entryIndex = backingMap.indexOf(element); in remove()
102 int oldCount = backingMap.getValue(entryIndex); in remove()
106 backingMap.setValue(entryIndex, oldCount - occurrences); in remove()
109 backingMap.removeEntry(entryIndex); in remove()
[all …]
DStandardTable.java66 @GwtTransient final Map<R, Map<C, V>> backingMap; field in StandardTable
69 StandardTable(Map<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) { in StandardTable() argument
70 this.backingMap = backingMap; in StandardTable()
86 for (Map<C, V> map : backingMap.values()) { in containsColumn()
96 return rowKey != null && safeContainsKey(backingMap, rowKey); in containsRow()
111 return backingMap.isEmpty(); in isEmpty()
117 for (Map<C, V> map : backingMap.values()) { in size()
127 backingMap.clear(); in clear()
131 Map<C, V> map = backingMap.get(rowKey); in getOrCreate()
134 backingMap.put(rowKey, map); in getOrCreate()
[all …]
DMutableClassToInstanceMap.java60 public static <B> MutableClassToInstanceMap<B> create(Map<Class<? extends B>, B> backingMap) { in create() argument
61 return new MutableClassToInstanceMap<B>(backingMap); in create()
158 private final Map<Class<? extends B>, B> backingMap;
160 SerializedForm(Map<Class<? extends B>, B> backingMap) {
161 this.backingMap = backingMap;
165 return create(backingMap);
DHashBasedTable.java84 Map<R, Map<C, V>> backingMap = Maps.newLinkedHashMapWithExpectedSize(expectedRows); in create() local
85 return new HashBasedTable<>(backingMap, new Factory<C, V>(expectedCellsPerRow)); in create()
102 HashBasedTable(Map<R, Map<C, V>> backingMap, Factory<C, V> factory) { in HashBasedTable() argument
103 super(backingMap, factory); in HashBasedTable()
DImmutableMultiset.java533 ObjectCountHashMap<? extends E> backingMap = tryGetMap(multiset); in addAll() local
534 if (backingMap != null) { in addAll()
535 contents.ensureCapacity(Math.max(contents.size(), backingMap.size())); in addAll()
536 for (int i = backingMap.firstIndex(); i >= 0; i = backingMap.nextIndex(i)) { in addAll()
537 addCopies(backingMap.getKey(i), backingMap.getValue(i)); in addAll()
576 return ((AbstractMapBasedMultiset<T>) multiset).backingMap; in tryGetMap()
DStandardRowSortedTable.java57 SortedMap<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) { in StandardRowSortedTable() argument
58 super(backingMap, factory); in StandardRowSortedTable()
62 return (SortedMap<R, Map<C, V>>) backingMap; in sortedBackingMap()
/external/guava/guava/src/com/google/common/collect/
DAbstractMapBasedMultiset.java49 private transient Map<E, Count> backingMap; field in AbstractMapBasedMultiset
59 protected AbstractMapBasedMultiset(Map<E, Count> backingMap) { in AbstractMapBasedMultiset() argument
60 checkArgument(backingMap.isEmpty()); in AbstractMapBasedMultiset()
61 this.backingMap = backingMap; in AbstractMapBasedMultiset()
65 void setBackingMap(Map<E, Count> backingMap) { in setBackingMap() argument
66 this.backingMap = backingMap; in setBackingMap()
85 final Iterator<Map.Entry<E, Count>> backingEntries = backingMap.entrySet().iterator(); in elementIterator()
113 final Iterator<Map.Entry<E, Count>> backingEntries = backingMap.entrySet().iterator(); in entryIterator()
136 Count frequency = backingMap.get(getElement()); in entryIterator()
159 backingMap.forEach((element, count) -> action.accept(element, count.get()));
[all …]
DStandardTable.java68 @GwtTransient final Map<R, Map<C, V>> backingMap; field in StandardTable
71 StandardTable(Map<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) { in StandardTable() argument
72 this.backingMap = backingMap; in StandardTable()
88 for (Map<C, V> map : backingMap.values()) { in containsColumn()
98 return rowKey != null && safeContainsKey(backingMap, rowKey); in containsRow()
113 return backingMap.isEmpty(); in isEmpty()
119 for (Map<C, V> map : backingMap.values()) { in size()
129 backingMap.clear(); in clear()
133 Map<C, V> map = backingMap.get(rowKey); in getOrCreate()
136 backingMap.put(rowKey, map); in getOrCreate()
[all …]
DMutableClassToInstanceMap.java61 public static <B> MutableClassToInstanceMap<B> create(Map<Class<? extends B>, B> backingMap) { in create() argument
62 return new MutableClassToInstanceMap<B>(backingMap); in create()
169 private final Map<Class<? extends B>, B> backingMap;
171 SerializedForm(Map<Class<? extends B>, B> backingMap) {
172 this.backingMap = backingMap;
176 return create(backingMap);
DHashBasedTable.java84 Map<R, Map<C, V>> backingMap = Maps.newLinkedHashMapWithExpectedSize(expectedRows); in create() local
85 return new HashBasedTable<>(backingMap, new Factory<C, V>(expectedCellsPerRow)); in create()
102 HashBasedTable(Map<R, Map<C, V>> backingMap, Factory<C, V> factory) { in HashBasedTable() argument
103 super(backingMap, factory); in HashBasedTable()
DStandardRowSortedTable.java57 SortedMap<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) { in StandardRowSortedTable() argument
58 super(backingMap, factory); in StandardRowSortedTable()
62 return (SortedMap<R, Map<C, V>>) backingMap; in sortedBackingMap()
DAbstractSortedKeySortedSetMultimap.java46 SortedMap<K, Collection<V>> backingMap() { in backingMap() method in AbstractSortedKeySortedSetMultimap
47 return (SortedMap<K, Collection<V>>) super.backingMap(); in backingMap()
/external/guava/guava-tests/test/com/google/common/collect/
DConcurrentHashMultisetTest.java104 ConcurrentMap<String, AtomicInteger> backingMap;
110 backingMap = mock(ConcurrentMap.class);
111 when(backingMap.isEmpty()).thenReturn(true);
113 multiset = new ConcurrentHashMultiset<>(backingMap);
118 when(backingMap.get(KEY)).thenReturn(new AtomicInteger(COUNT));
124 when(backingMap.get(KEY)).thenReturn(null);
132 when(backingMap.get(KEY)).thenReturn(new AtomicInteger(INITIAL_COUNT));
139 when(backingMap.get(KEY)).thenReturn(null);
140 when(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).thenReturn(null);
150 when(backingMap.get(KEY)).thenReturn(initial);
[all …]
DForwardingNavigableMapTest.java51 private final NavigableMap<K, V> backingMap; field in ForwardingNavigableMapTest.StandardImplForwardingNavigableMap
53 StandardImplForwardingNavigableMap(NavigableMap<K, V> backingMap) { in StandardImplForwardingNavigableMap() argument
54 this.backingMap = backingMap; in StandardImplForwardingNavigableMap()
59 return backingMap; in delegate()
116 return backingMap.entrySet().iterator(); in entrySet()
233 private final NavigableMap<K, V> backingMap;
235 StandardLastEntryForwardingNavigableMap(NavigableMap<K, V> backingMap) {
236 this.backingMap = backingMap;
241 return backingMap;
DSimpleAbstractMultisetTest.java96 final Map<E, Integer> backingMap = Maps.newHashMap(); field in SimpleAbstractMultisetTest.NoRemoveMultiset
121 Integer frequency = backingMap.get(element); in add()
129 backingMap.put(element, frequency + occurrences); in add()
140 final Iterator<Map.Entry<E, Integer>> backingEntries = backingMap.entrySet().iterator(); in entryIterator()
158 Integer frequency = backingMap.get(getElement()); in entryIterator()
173 return backingMap.size();
/external/guava/android/guava-tests/test/com/google/common/collect/
DConcurrentHashMultisetTest.java104 ConcurrentMap<String, AtomicInteger> backingMap;
110 backingMap = mock(ConcurrentMap.class);
111 when(backingMap.isEmpty()).thenReturn(true);
113 multiset = new ConcurrentHashMultiset<>(backingMap);
118 when(backingMap.get(KEY)).thenReturn(new AtomicInteger(COUNT));
124 when(backingMap.get(KEY)).thenReturn(null);
132 when(backingMap.get(KEY)).thenReturn(new AtomicInteger(INITIAL_COUNT));
139 when(backingMap.get(KEY)).thenReturn(null);
140 when(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).thenReturn(null);
150 when(backingMap.get(KEY)).thenReturn(initial);
[all …]
DForwardingNavigableMapTest.java51 private final NavigableMap<K, V> backingMap; field in ForwardingNavigableMapTest.StandardImplForwardingNavigableMap
53 StandardImplForwardingNavigableMap(NavigableMap<K, V> backingMap) { in StandardImplForwardingNavigableMap() argument
54 this.backingMap = backingMap; in StandardImplForwardingNavigableMap()
59 return backingMap; in delegate()
116 return backingMap.entrySet().iterator(); in entrySet()
233 private final NavigableMap<K, V> backingMap;
235 StandardLastEntryForwardingNavigableMap(NavigableMap<K, V> backingMap) {
236 this.backingMap = backingMap;
241 return backingMap;
DSimpleAbstractMultisetTest.java96 final Map<E, Integer> backingMap = Maps.newHashMap(); field in SimpleAbstractMultisetTest.NoRemoveMultiset
121 Integer frequency = backingMap.get(element); in add()
129 backingMap.put(element, frequency + occurrences); in add()
140 final Iterator<Map.Entry<E, Integer>> backingEntries = backingMap.entrySet().iterator(); in entryIterator()
158 Integer frequency = backingMap.get(getElement()); in entryIterator()
173 return backingMap.size();
/external/guava/guava/src/com/google/common/graph/
DMapIteratorCache.java45 private final Map<K, V> backingMap; field in MapIteratorCache
58 MapIteratorCache(Map<K, V> backingMap) { in MapIteratorCache() argument
59 this.backingMap = checkNotNull(backingMap); in MapIteratorCache()
65 return backingMap.put(key, value); in put()
71 return backingMap.remove(key); in remove()
76 backingMap.clear(); in clear()
85 return backingMap.get(key); in getWithoutCaching()
89 return getIfCached(key) != null || backingMap.containsKey(key); in containsKey()
96 final Iterator<Entry<K, V>> entryIterator = backingMap.entrySet().iterator(); in unmodifiableKeySet()
115 return backingMap.size(); in unmodifiableKeySet()
/external/guava/android/guava/src/com/google/common/graph/
DMapIteratorCache.java45 private final Map<K, V> backingMap; field in MapIteratorCache
58 MapIteratorCache(Map<K, V> backingMap) { in MapIteratorCache() argument
59 this.backingMap = checkNotNull(backingMap); in MapIteratorCache()
65 return backingMap.put(key, value); in put()
71 return backingMap.remove(key); in remove()
76 backingMap.clear(); in clear()
85 return backingMap.get(key); in getWithoutCaching()
89 return getIfCached(key) != null || backingMap.containsKey(key); in containsKey()
96 final Iterator<Entry<K, V>> entryIterator = backingMap.entrySet().iterator(); in unmodifiableKeySet()
115 return backingMap.size(); in unmodifiableKeySet()
/external/guice/core/src/com/google/inject/internal/
DWeakKeySet.java42 private Map<Key<?>, Multiset<Object>> backingMap; field in WeakKeySet
75 Multiset<Object> set = backingMap.get(keyAndSource.key); in cleanUpForCollectedState()
79 backingMap.remove(keyAndSource.key); in cleanUpForCollectedState()
91 if (backingMap == null) { in add()
92 backingMap = Maps.newHashMap(); in add()
99 Multiset<Object> sources = backingMap.get(key); in add()
102 backingMap.put(key, sources); in add()
119 return backingMap != null && backingMap.containsKey(key); in contains()
124 Multiset<Object> sources = (backingMap == null) ? null : backingMap.get(key); in getSources()
/external/exoplayer/tree/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/
DFullSegmentEncryptionKeyCache.java31 private final LinkedHashMap<Uri, byte[]> backingMap; field in FullSegmentEncryptionKeyCache
34 backingMap = in FullSegmentEncryptionKeyCache()
53 return backingMap.get(uri); in get()
63 return backingMap.put(Assertions.checkNotNull(uri), Assertions.checkNotNull(encryptionKey)); in put()
72 return backingMap.containsKey(Assertions.checkNotNull(uri)); in containsUri()
83 return backingMap.remove(Assertions.checkNotNull(uri)); in remove()
/external/autotest/frontend/client/src/autotest/common/table/
DJSONObjectSet.java16 protected Map<String, T> backingMap = new HashMap<String, T>(); field in JSONObjectSet
33 return backingMap.put(getKey(arg0), arg0) == null; in add()
38 return backingMap.values().iterator(); in iterator()
43 return backingMap.remove(getKey(arg0)) != null; in remove()
48 return backingMap.containsKey(getKey(o)); in contains()
53 return backingMap.size(); in size()
/external/guava/guava/src/com/google/common/reflect/
DMutableTypeToInstanceMap.java42 private final Map<TypeToken<? extends B>, B> backingMap = Maps.newHashMap(); field in MutableTypeToInstanceMap
98 return backingMap; in delegate()
103 return (T) backingMap.put(type, value); in trustedPut()
108 return (T) backingMap.get(type); in trustedGet()
/external/guava/android/guava/src/com/google/common/reflect/
DMutableTypeToInstanceMap.java42 private final Map<TypeToken<? extends B>, B> backingMap = Maps.newHashMap(); field in MutableTypeToInstanceMap
102 return backingMap; in delegate()
108 return (T) backingMap.put(type, value); in trustedPut()
114 return (T) backingMap.get(type); in trustedGet()

12