5package io.flutter.embedding.engine;
7import androidx.annotation.NonNull;
8import androidx.annotation.Nullable;
9import androidx.annotation.VisibleForTesting;
10import java.util.HashMap;
47 private final Map<String, FlutterEngineGroup> cachedEngineGroups =
new HashMap<>();
56 public boolean contains(@NonNull String engineGroupId) {
57 return cachedEngineGroups.containsKey(engineGroupId);
67 return cachedEngineGroups.get(engineGroupId);
78 if (engineGroup !=
null) {
79 cachedEngineGroups.put(engineGroupId, engineGroup);
81 cachedEngineGroups.remove(engineGroupId);
89 public void remove(@NonNull String engineGroupId) {
90 put(engineGroupId,
null);
98 cachedEngineGroups.clear();
void put(@NonNull String engineGroupId, @Nullable FlutterEngineGroup engineGroup)
FlutterEngineGroupCache()
boolean contains(@NonNull String engineGroupId)
static FlutterEngineGroupCache getInstance()