Example usage for com.facebook.react.common MapBuilder newHashMap

List of usage examples for com.facebook.react.common MapBuilder newHashMap

Introduction

In this page you can find the example usage for com.facebook.react.common MapBuilder newHashMap.

Prototype

public static <K, V> HashMap<K, V> newHashMap() 

Source Link

Document

Creates an instance of HashMap

Usage

From source file:com.doozy.alarm.AlarmModule.java

License:Open Source License

@Override
public Map<String, Object> getConstants() {
    final Map<String, Object> constants = MapBuilder.newHashMap();
    constants.put(SOMETHING, SOMETHING);
    return constants;
}

From source file:com.fb.react.modules.toast.StdToastModule.java

License:Open Source License

@Override
public Map<String, Object> getConstants() {
    final Map<String, Object> constants = MapBuilder.newHashMap();
    constants.put(DURATION_SHORT_KEY, Toast.LENGTH_SHORT);
    constants.put(DURATION_LONG_KEY, Toast.LENGTH_LONG);
    return constants;
}