/** Gets a mutable List view of this MapField. */ List<Message> getMutableList() { if (mode != StorageMode.LIST) { if (mode == StorageMode.MAP) { listData = convertMapToList(mapData); } mapData = null; mode = StorageMode.LIST; } return listData; }
/** Gets the content of this MapField as a read-only List. */ List<Message> getList() { if (mode == StorageMode.MAP) { synchronized (this) { if (mode == StorageMode.MAP) { listData = convertMapToList(mapData); mode = StorageMode.BOTH; } } } return Collections.unmodifiableList(listData); }
/** Gets a mutable List view of this MapField. */ List<Message> getMutableList() { if (mode != StorageMode.LIST) { if (mode == StorageMode.MAP) { listData = convertMapToList(mapData); } mapData = null; mode = StorageMode.LIST; } return listData; }
/** Gets the content of this MapField as a read-only List. */ List<Message> getList() { if (mode == StorageMode.MAP) { synchronized (this) { if (mode == StorageMode.MAP) { listData = convertMapToList(mapData); mode = StorageMode.BOTH; } } } return Collections.unmodifiableList(listData); }