MapField.java
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 package com.google.protobuf;
32 
33 import static com.google.protobuf.Internal.checkNotNull;
34 
35 import java.util.ArrayList;
36 import java.util.Collection;
37 import java.util.Collections;
38 import java.util.Iterator;
39 import java.util.LinkedHashMap;
40 import java.util.List;
41 import java.util.Map;
42 import java.util.Set;
43 
56 public class MapField<K, V> implements MutabilityOracle {
57 
80  private enum StorageMode {
81  MAP,
83  BOTH
84  }
85 
86  private volatile boolean isMutable;
87  private volatile StorageMode mode;
89  private List<Message> listData;
90 
91  // Convert between a map entry Message and a key-value pair.
92  private static interface Converter<K, V> {
94 
96 
98  }
99 
100  private static class ImmutableMessageConverter<K, V> implements Converter<K, V> {
102 
104  this.defaultEntry = defaultEntry;
105  }
106 
107  @Override
109  return defaultEntry.newBuilderForType().setKey(key).setValue(value).buildPartial();
110  }
111 
112  @Override
113  @SuppressWarnings("unchecked")
116  map.put(entry.getKey(), entry.getValue());
117  }
118 
119  @Override
121  return defaultEntry;
122  }
123  }
124 
125 
126  private final Converter<K, V> converter;
127 
129  this.converter = converter;
130  this.isMutable = true;
131  this.mode = mode;
132  this.mapData = new MutatabilityAwareMap<K, V>(this, mapData);
133  this.listData = null;
134  }
135 
136  private MapField(MapEntry<K, V> defaultEntry, StorageMode mode, Map<K, V> mapData) {
137  this(new ImmutableMessageConverter<K, V>(defaultEntry), mode, mapData);
138  }
139 
140 
142  public static <K, V> MapField<K, V> emptyMapField(MapEntry<K, V> defaultEntry) {
143  return new MapField<K, V>(defaultEntry, StorageMode.MAP, Collections.<K, V>emptyMap());
144  }
145 
146 
148  public static <K, V> MapField<K, V> newMapField(MapEntry<K, V> defaultEntry) {
149  return new MapField<K, V>(defaultEntry, StorageMode.MAP, new LinkedHashMap<K, V>());
150  }
151 
152 
154  return converter.convertKeyAndValueToMessage(key, value);
155  }
156 
157  @SuppressWarnings("unchecked")
159  converter.convertMessageToKeyAndValue(message, map);
160  }
161 
163  List<Message> listData = new ArrayList<Message>();
164  for (Map.Entry<K, V> entry : mapData.entrySet()) {
165  listData.add(convertKeyAndValueToMessage(entry.getKey(), entry.getValue()));
166  }
167  return listData;
168  }
169 
171  Map<K, V> mapData = new LinkedHashMap<K, V>();
172  for (Message item : listData) {
174  }
175  return new MutatabilityAwareMap<K, V>(this, mapData);
176  }
177 
179  public Map<K, V> getMap() {
180  if (mode == StorageMode.LIST) {
181  synchronized (this) {
182  if (mode == StorageMode.LIST) {
185  }
186  }
187  }
188  return Collections.unmodifiableMap(mapData);
189  }
190 
192  public Map<K, V> getMutableMap() {
193  if (mode != StorageMode.MAP) {
194  if (mode == StorageMode.LIST) {
196  }
197  listData = null;
198  mode = StorageMode.MAP;
199  }
200  return mapData;
201  }
202 
203  public void mergeFrom(MapField<K, V> other) {
204  getMutableMap().putAll(MapFieldLite.copy(other.getMap()));
205  }
206 
207  public void clear() {
208  mapData = new MutatabilityAwareMap<K, V>(this, new LinkedHashMap<K, V>());
209  mode = StorageMode.MAP;
210  }
211 
212  @SuppressWarnings("unchecked")
213  @Override
214  public boolean equals(Object object) {
215  if (!(object instanceof MapField)) {
216  return false;
217  }
218  MapField<K, V> other = (MapField<K, V>) object;
219  return MapFieldLite.<K, V>equals(getMap(), other.getMap());
220  }
221 
222  @Override
223  public int hashCode() {
224  return MapFieldLite.<K, V>calculateHashCodeForMap(getMap());
225  }
226 
228  public MapField<K, V> copy() {
230  }
231 
233  List<Message> getList() {
234  if (mode == StorageMode.MAP) {
235  synchronized (this) {
236  if (mode == StorageMode.MAP) {
238  mode = StorageMode.BOTH;
239  }
240  }
241  }
242  return Collections.unmodifiableList(listData);
243  }
244 
246  List<Message> getMutableList() {
247  if (mode != StorageMode.LIST) {
248  if (mode == StorageMode.MAP) {
250  }
251  mapData = null;
252  mode = StorageMode.LIST;
253  }
254  return listData;
255  }
256 
258  Message getMapEntryMessageDefaultInstance() {
259  return converter.getMessageDefaultInstance();
260  }
261 
266  public void makeImmutable() {
267  isMutable = false;
268  }
269 
271  public boolean isMutable() {
272  return isMutable;
273  }
274 
275  /* (non-Javadoc)
276  * @see com.google.protobuf.MutabilityOracle#ensureMutable()
277  */
278  @Override
279  public void ensureMutable() {
280  if (!isMutable()) {
281  throw new UnsupportedOperationException();
282  }
283  }
284 
286  private static class MutatabilityAwareMap<K, V> implements Map<K, V> {
287  private final MutabilityOracle mutabilityOracle;
288  private final Map<K, V> delegate;
289 
290  MutatabilityAwareMap(MutabilityOracle mutabilityOracle, Map<K, V> delegate) {
291  this.mutabilityOracle = mutabilityOracle;
292  this.delegate = delegate;
293  }
294 
295  @Override
296  public int size() {
297  return delegate.size();
298  }
299 
300  @Override
301  public boolean isEmpty() {
302  return delegate.isEmpty();
303  }
304 
305  @Override
306  public boolean containsKey(Object key) {
307  return delegate.containsKey(key);
308  }
309 
310  @Override
311  public boolean containsValue(Object value) {
312  return delegate.containsValue(value);
313  }
314 
315  @Override
316  public V get(Object key) {
317  return delegate.get(key);
318  }
319 
320  @Override
321  public V put(K key, V value) {
322  mutabilityOracle.ensureMutable();
323  checkNotNull(key);
324  checkNotNull(value);
325  return delegate.put(key, value);
326  }
327 
328  @Override
329  public V remove(Object key) {
330  mutabilityOracle.ensureMutable();
331  return delegate.remove(key);
332  }
333 
334  @Override
335  public void putAll(Map<? extends K, ? extends V> m) {
336  mutabilityOracle.ensureMutable();
337  for (K key : m.keySet()) {
338  checkNotNull(key);
339  checkNotNull(m.get(key));
340  }
341  delegate.putAll(m);
342  }
343 
344  @Override
345  public void clear() {
346  mutabilityOracle.ensureMutable();
347  delegate.clear();
348  }
349 
350  @Override
351  public Set<K> keySet() {
352  return new MutatabilityAwareSet<K>(mutabilityOracle, delegate.keySet());
353  }
354 
355  @Override
356  public Collection<V> values() {
358  }
359 
360  @Override
361  public Set<java.util.Map.Entry<K, V>> entrySet() {
363  }
364 
365  @Override
366  public boolean equals(Object o) {
367  return delegate.equals(o);
368  }
369 
370  @Override
371  public int hashCode() {
372  return delegate.hashCode();
373  }
374 
375  @Override
376  public String toString() {
377  return delegate.toString();
378  }
379 
381  private static class MutatabilityAwareCollection<E> implements Collection<E> {
382  private final MutabilityOracle mutabilityOracle;
383  private final Collection<E> delegate;
384 
385  MutatabilityAwareCollection(MutabilityOracle mutabilityOracle, Collection<E> delegate) {
386  this.mutabilityOracle = mutabilityOracle;
387  this.delegate = delegate;
388  }
389 
390  @Override
391  public int size() {
392  return delegate.size();
393  }
394 
395  @Override
396  public boolean isEmpty() {
397  return delegate.isEmpty();
398  }
399 
400  @Override
401  public boolean contains(Object o) {
402  return delegate.contains(o);
403  }
404 
405  @Override
406  public Iterator<E> iterator() {
408  }
409 
410  @Override
411  public Object[] toArray() {
412  return delegate.toArray();
413  }
414 
415  @Override
416  public <T> T[] toArray(T[] a) {
417  return delegate.toArray(a);
418  }
419 
420  @Override
421  public boolean add(E e) {
422  // Unsupported operation in the delegate.
423  throw new UnsupportedOperationException();
424  }
425 
426  @Override
427  public boolean remove(Object o) {
428  mutabilityOracle.ensureMutable();
429  return delegate.remove(o);
430  }
431 
432  @Override
433  public boolean containsAll(Collection<?> c) {
434  return delegate.containsAll(c);
435  }
436 
437  @Override
438  public boolean addAll(Collection<? extends E> c) {
439  // Unsupported operation in the delegate.
440  throw new UnsupportedOperationException();
441  }
442 
443  @Override
444  public boolean removeAll(Collection<?> c) {
445  mutabilityOracle.ensureMutable();
446  return delegate.removeAll(c);
447  }
448 
449  @Override
450  public boolean retainAll(Collection<?> c) {
451  mutabilityOracle.ensureMutable();
452  return delegate.retainAll(c);
453  }
454 
455  @Override
456  public void clear() {
457  mutabilityOracle.ensureMutable();
458  delegate.clear();
459  }
460 
461  @Override
462  public boolean equals(Object o) {
463  return delegate.equals(o);
464  }
465 
466  @Override
467  public int hashCode() {
468  return delegate.hashCode();
469  }
470 
471  @Override
472  public String toString() {
473  return delegate.toString();
474  }
475  }
476 
478  private static class MutatabilityAwareSet<E> implements Set<E> {
479  private final MutabilityOracle mutabilityOracle;
480  private final Set<E> delegate;
481 
482  MutatabilityAwareSet(MutabilityOracle mutabilityOracle, Set<E> delegate) {
483  this.mutabilityOracle = mutabilityOracle;
484  this.delegate = delegate;
485  }
486 
487  @Override
488  public int size() {
489  return delegate.size();
490  }
491 
492  @Override
493  public boolean isEmpty() {
494  return delegate.isEmpty();
495  }
496 
497  @Override
498  public boolean contains(Object o) {
499  return delegate.contains(o);
500  }
501 
502  @Override
503  public Iterator<E> iterator() {
505  }
506 
507  @Override
508  public Object[] toArray() {
509  return delegate.toArray();
510  }
511 
512  @Override
513  public <T> T[] toArray(T[] a) {
514  return delegate.toArray(a);
515  }
516 
517  @Override
518  public boolean add(E e) {
519  mutabilityOracle.ensureMutable();
520  return delegate.add(e);
521  }
522 
523  @Override
524  public boolean remove(Object o) {
525  mutabilityOracle.ensureMutable();
526  return delegate.remove(o);
527  }
528 
529  @Override
530  public boolean containsAll(Collection<?> c) {
531  return delegate.containsAll(c);
532  }
533 
534  @Override
535  public boolean addAll(Collection<? extends E> c) {
536  mutabilityOracle.ensureMutable();
537  return delegate.addAll(c);
538  }
539 
540  @Override
541  public boolean retainAll(Collection<?> c) {
542  mutabilityOracle.ensureMutable();
543  return delegate.retainAll(c);
544  }
545 
546  @Override
547  public boolean removeAll(Collection<?> c) {
548  mutabilityOracle.ensureMutable();
549  return delegate.removeAll(c);
550  }
551 
552  @Override
553  public void clear() {
554  mutabilityOracle.ensureMutable();
555  delegate.clear();
556  }
557 
558  @Override
559  public boolean equals(Object o) {
560  return delegate.equals(o);
561  }
562 
563  @Override
564  public int hashCode() {
565  return delegate.hashCode();
566  }
567 
568  @Override
569  public String toString() {
570  return delegate.toString();
571  }
572  }
573 
575  private static class MutatabilityAwareIterator<E> implements Iterator<E> {
576  private final MutabilityOracle mutabilityOracle;
577  private final Iterator<E> delegate;
578 
579  MutatabilityAwareIterator(MutabilityOracle mutabilityOracle, Iterator<E> delegate) {
580  this.mutabilityOracle = mutabilityOracle;
581  this.delegate = delegate;
582  }
583 
584  @Override
585  public boolean hasNext() {
586  return delegate.hasNext();
587  }
588 
589  @Override
590  public E next() {
591  return delegate.next();
592  }
593 
594  @Override
595  public void remove() {
596  mutabilityOracle.ensureMutable();
597  delegate.remove();
598  }
599 
600  @Override
601  public boolean equals(Object obj) {
602  return delegate.equals(obj);
603  }
604 
605  @Override
606  public int hashCode() {
607  return delegate.hashCode();
608  }
609 
610  @Override
611  public String toString() {
612  return delegate.toString();
613  }
614  }
615  }
616 }
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.hashCode
int hashCode()
Definition: MapField.java:467
Map
struct Map Map
Definition: php/ext/google/protobuf/protobuf.h:648
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.delegate
final Iterator< E > delegate
Definition: MapField.java:577
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.containsAll
boolean containsAll(Collection<?> c)
Definition: MapField.java:433
com.google.protobuf.MapField.getMutableMap
Map< K, V > getMutableMap()
Definition: MapField.java:192
com.google.protobuf.MapField.convertKeyAndValueToMessage
Message convertKeyAndValueToMessage(K key, V value)
Definition: MapField.java:153
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.add
boolean add(E e)
Definition: MapField.java:421
K
#define K(t)
Definition: sha1.c:43
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.contains
boolean contains(Object o)
Definition: MapField.java:401
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection
Definition: MapField.java:381
com.google.protobuf.MapField.ImmutableMessageConverter.convertKeyAndValueToMessage
Message convertKeyAndValueToMessage(K key, V value)
Definition: MapField.java:108
com.google.protobuf.MapEntry.getValue
V getValue()
Definition: MapEntry.java:135
com.google.protobuf.MapField.MutatabilityAwareMap.putAll
void putAll(Map<? extends K, ? extends V > m)
Definition: MapField.java:335
com.google.protobuf.MapField.ensureMutable
void ensureMutable()
Definition: MapField.java:279
com.google.protobuf.MapField.MutatabilityAwareMap.hashCode
int hashCode()
Definition: MapField.java:371
com.google.protobuf.MapField.MapField
MapField(Converter< K, V > converter, StorageMode mode, Map< K, V > mapData)
Definition: MapField.java:128
com.google.protobuf.MapField.converter
final Converter< K, V > converter
Definition: MapField.java:126
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.addAll
boolean addAll(Collection<? extends E > c)
Definition: MapField.java:438
item
cJSON * item
Definition: cJSON.h:236
com.google.protobuf.MapEntry
Definition: MapEntry.java:50
com.google.protobuf.MapField.StorageMode
Definition: MapField.java:80
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.iterator
Iterator< E > iterator()
Definition: MapField.java:406
com.google.protobuf.MapField.listData
List< Message > listData
Definition: MapField.java:89
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.mutabilityOracle
final MutabilityOracle mutabilityOracle
Definition: MapField.java:576
mode
GLenum mode
Definition: glcorearb.h:2764
com.google.protobuf.MapField.MutatabilityAwareMap.put
V put(K key, V value)
Definition: MapField.java:321
com.google.protobuf.MapField.ImmutableMessageConverter
Definition: MapField.java:100
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.delegate
final Collection< E > delegate
Definition: MapField.java:383
com.google.protobuf.MapField.mode
volatile StorageMode mode
Definition: MapField.java:87
com.google.protobuf.MapField.MutatabilityAwareMap.mutabilityOracle
final MutabilityOracle mutabilityOracle
Definition: MapField.java:287
com.google.protobuf.MapField.mergeFrom
void mergeFrom(MapField< K, V > other)
Definition: MapField.java:203
com.google.protobuf.MapField.StorageMode.BOTH
BOTH
Definition: MapField.java:83
com.google.protobuf.MapField.newMapField
static< K, V > MapField< K, V > newMapField(MapEntry< K, V > defaultEntry)
Definition: MapField.java:148
com.google.protobuf.MapField.mapData
MutatabilityAwareMap< K, V > mapData
Definition: MapField.java:88
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet
Definition: MapField.java:478
com.google.protobuf.MapField.isMutable
volatile boolean isMutable
Definition: MapField.java:86
com.google.protobuf
Definition: ProtoCaliperBenchmark.java:2
com.google.protobuf.MapField.Converter.convertMessageToKeyAndValue
void convertMessageToKeyAndValue(Message message, Map< K, V > map)
com.google.protobuf.MapField.equals
boolean equals(Object object)
Definition: MapField.java:214
com.google.protobuf.MapField.isMutable
boolean isMutable()
Definition: MapField.java:271
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.retainAll
boolean retainAll(Collection<?> c)
Definition: MapField.java:541
map
zval * map
Definition: php/ext/google/protobuf/encode_decode.c:473
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.removeAll
boolean removeAll(Collection<?> c)
Definition: MapField.java:547
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.hasNext
boolean hasNext()
Definition: MapField.java:585
T
#define T(upbtypeconst, upbtype, ctype, default_value)
com.google.protobuf.MapField.ImmutableMessageConverter.convertMessageToKeyAndValue
void convertMessageToKeyAndValue(Message message, Map< K, V > map)
Definition: MapField.java:114
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.size
int size()
Definition: MapField.java:488
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.size
int size()
Definition: MapField.java:391
com.google.protobuf.MapEntry.getKey
K getKey()
Definition: MapEntry.java:131
com.google.protobuf.MapField.MutatabilityAwareMap.size
int size()
Definition: MapField.java:296
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.clear
void clear()
Definition: MapField.java:456
com.google.protobuf.MapField.copy
MapField< K, V > copy()
Definition: MapField.java:228
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.isEmpty
boolean isEmpty()
Definition: MapField.java:396
com.google.protobuf.MapField
Definition: MapField.java:56
com.google.protobuf.MapField.MutatabilityAwareMap.values
Collection< V > values()
Definition: MapField.java:356
obj
GLsizei GLsizei GLuint * obj
Definition: glcorearb.h:3066
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.hashCode
int hashCode()
Definition: MapField.java:606
com.google.protobuf.MapField.getMap
Map< K, V > getMap()
Definition: MapField.java:179
com.google.protobuf.MapField.hashCode
int hashCode()
Definition: MapField.java:223
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.delegate
final Set< E > delegate
Definition: MapField.java:480
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.next
E next()
Definition: MapField.java:590
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.removeAll
boolean removeAll(Collection<?> c)
Definition: MapField.java:444
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.toString
String toString()
Definition: MapField.java:569
com.google.protobuf.MapField.StorageMode.LIST
LIST
Definition: MapField.java:82
com.google.protobuf.MapField.MapField
MapField(MapEntry< K, V > defaultEntry, StorageMode mode, Map< K, V > mapData)
Definition: MapField.java:136
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.iterator
Iterator< E > iterator()
Definition: MapField.java:503
com.google.protobuf.MapField.MutatabilityAwareMap.isEmpty
boolean isEmpty()
Definition: MapField.java:301
com.google.protobuf.MapField.convertListToMap
MutatabilityAwareMap< K, V > convertListToMap(List< Message > listData)
Definition: MapField.java:170
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.equals
boolean equals(Object o)
Definition: MapField.java:559
com.google.protobuf.MapField.MutatabilityAwareMap.containsValue
boolean containsValue(Object value)
Definition: MapField.java:311
com.google.protobuf.MapField.Converter.getMessageDefaultInstance
Message getMessageDefaultInstance()
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.toArray
Object[] toArray()
Definition: MapField.java:411
com.google.protobuf.MapField.clear
void clear()
Definition: MapField.java:207
key
const SETUP_TEARDOWN_TESTCONTEXT char * key
Definition: test_wss_transport.cpp:10
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.toString
String toString()
Definition: MapField.java:611
com.google.protobuf.MapField.MutatabilityAwareMap.containsKey
boolean containsKey(Object key)
Definition: MapField.java:306
com.google.protobuf.MapField.Converter
Definition: MapField.java:92
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.equals
boolean equals(Object o)
Definition: MapField.java:462
com.google.protobuf.MapField.MutatabilityAwareMap.keySet
Set< K > keySet()
Definition: MapField.java:351
com.google.protobuf.MapField.MutatabilityAwareMap.clear
void clear()
Definition: MapField.java:345
java
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.addAll
boolean addAll(Collection<? extends E > c)
Definition: MapField.java:535
com.google.protobuf.MapFieldLite.copy
static Object copy(Object object)
Definition: MapFieldLite.java:190
com.google.protobuf.MapField.ImmutableMessageConverter.getMessageDefaultInstance
Message getMessageDefaultInstance()
Definition: MapField.java:120
com.google.protobuf.MapField.convertMessageToKeyAndValue
void convertMessageToKeyAndValue(Message message, Map< K, V > map)
Definition: MapField.java:158
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator
Definition: MapField.java:575
com.google.protobuf.MapField.MutatabilityAwareMap.delegate
final Map< K, V > delegate
Definition: MapField.java:288
com.google.protobuf.MapField.makeImmutable
void makeImmutable()
Definition: MapField.java:266
com.google.protobuf.MapFieldLite
Definition: MapFieldLite.java:47
m
const upb_json_parsermethod * m
Definition: ruby/ext/google/protobuf_c/upb.h:10501
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.mutabilityOracle
final MutabilityOracle mutabilityOracle
Definition: MapField.java:382
com.google
com
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.clear
void clear()
Definition: MapField.java:553
com.google.protobuf.MapField.ImmutableMessageConverter.ImmutableMessageConverter
ImmutableMessageConverter(MapEntry< K, V > defaultEntry)
Definition: MapField.java:103
com.google.protobuf.Internal
Definition: Internal.java:54
com.google.protobuf.MapField.ImmutableMessageConverter.defaultEntry
final MapEntry< K, V > defaultEntry
Definition: MapField.java:101
com.google.protobuf.MapField.convertMapToList
List< Message > convertMapToList(MutatabilityAwareMap< K, V > mapData)
Definition: MapField.java:162
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.add
boolean add(E e)
Definition: MapField.java:518
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.toArray
Object[] toArray()
Definition: MapField.java:508
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.mutabilityOracle
final MutabilityOracle mutabilityOracle
Definition: MapField.java:479
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.retainAll
boolean retainAll(Collection<?> c)
Definition: MapField.java:450
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.containsAll
boolean containsAll(Collection<?> c)
Definition: MapField.java:530
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.contains
boolean contains(Object o)
Definition: MapField.java:498
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.hashCode
int hashCode()
Definition: MapField.java:564
com.google.protobuf.MapField.MutatabilityAwareMap.toString
String toString()
Definition: MapField.java:376
com.google.protobuf.MapField.MutatabilityAwareMap.entrySet
Set< java.util.Map.Entry< K, V > > entrySet()
Definition: MapField.java:361
com.google.protobuf.MapField.MutatabilityAwareMap
Definition: MapField.java:286
a
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:3228
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareIterator.equals
boolean equals(Object obj)
Definition: MapField.java:601
com.google.protobuf.MapField.emptyMapField
static< K, V > MapField< K, V > emptyMapField(MapEntry< K, V > defaultEntry)
Definition: MapField.java:142
com.google.protobuf.MapField.StorageMode.MAP
MAP
Definition: MapField.java:81
message
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glcorearb.h:2695
com.google.protobuf.MapField.MutatabilityAwareMap.equals
boolean equals(Object o)
Definition: MapField.java:366
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareCollection.toString
String toString()
Definition: MapField.java:472
com.google.protobuf.Message
Definition: Message.java:50
com.google.protobuf.MapField.MutatabilityAwareMap.MutatabilityAwareSet.isEmpty
boolean isEmpty()
Definition: MapField.java:493
com.google.protobuf.MapField.Converter.convertKeyAndValueToMessage
Message convertKeyAndValueToMessage(K key, V value)


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:56