Example usage for com.google.common.collect EnumHashBiMap EnumHashBiMap

List of usage examples for com.google.common.collect EnumHashBiMap EnumHashBiMap

Introduction

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

Prototype

private EnumHashBiMap(Class<K> keyType) 

Source Link

Usage

From source file:org.eclipse.b3.enums.TriStateEnumHelper.java

private static BiMap<TriState, String> createEnumMap() {
    BiMap<TriState, String> map = new EnumHashBiMap<TriState, String>(TriState.class);
    map.put(TriState.DEFAULT, DEFAULT_STR);
    map.put(TriState.TRUE, TRUE_STR);//from   w  ww.  j  a v  a2s  .co m
    map.put(TriState.FALSE, FALSE_STR);

    return Maps.unmodifiableBiMap(map);
}

From source file:org.eclipse.b3.enums.MergeConflictStrategyEnumHelper.java

private static BiMap<MergeConflictStrategy, String> createEnumMap() {
    BiMap<MergeConflictStrategy, String> map = new EnumHashBiMap<MergeConflictStrategy, String>(
            MergeConflictStrategy.class);
    map.put(MergeConflictStrategy.DEFAULT, BRANCH_POINT_DEFAULT_STR);
    map.put(MergeConflictStrategy.FAIL, FAIL_STR);
    map.put(MergeConflictStrategy.USE_WORKSPACE, USE_WORKSPACE_STR);
    map.put(MergeConflictStrategy.USE_SCM, USE_SCM_STR);

    return Maps.unmodifiableBiMap(map);
}