Example usage for com.google.common.collect HashBiMap forcePut

List of usage examples for com.google.common.collect HashBiMap forcePut

Introduction

In this page you can find the example usage for com.google.common.collect HashBiMap forcePut.

Prototype

@Override
    public V forcePut(@Nullable K key, @Nullable V value) 

Source Link

Usage

From source file:com.sql2nosql.node.TableAction.java

@Override
public void action(QueryTreeNode node, HashMap<String, Object> list) {

    if (node.getNodeType() == NodeTypes.FROM_BASE_TABLE) {

        FromBaseTable ref = (FromBaseTable) node;

        if (list.containsKey(TABLE)) {
            HashBiMap<String, String> subList = (HashBiMap) list.get(TABLE);
            subList.forcePut(ref.getOrigTableName().toString().toUpperCase(),
                    ref.getExposedName().toUpperCase());
            list.put(TABLE, subList);//  www  . ja v  a 2  s. c o m
        } else {
            HashBiMap<String, String> subList = HashBiMap.create();
            subList.forcePut(ref.getOrigTableName().toString().toUpperCase(),
                    ref.getExposedName().toUpperCase());
            list.put(TABLE, subList);
        }
    }
}