Example usage for com.google.common.collect BiMap clear

List of usage examples for com.google.common.collect BiMap clear

Introduction

In this page you can find the example usage for com.google.common.collect BiMap clear.

Prototype

void clear();

Source Link

Document

Removes all of the mappings from this map (optional operation).

Usage

From source file:com.android.tools.idea.editors.navigation.NavigationView.java

private void syncStateCache(BiMap<State, AndroidRootComponent> assoc) {
    if (DEBUG)/*from w w w .  j a va 2  s . c  om*/
        LOG.info("NavigationView: syncStateCache");
    assoc.clear();
    removeAll();
    //repaint();

    // add anything that is in the model but not in our cache
    for (State state : myNavigationModel.getStates()) {
        if (!assoc.containsKey(state)) {
            AndroidRootComponent root = createRootComponentFor(state);
            assoc.put(state, root);
            add(root);
        }
    }

    setPreferredSize();
}