From 639dd0f53a2e4844186cbff2c4214cbb163e86e0 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 8 Apr 2011 16:37:52 +0200 Subject: [PATCH] guava ftw --- .../jet/lang/types/JetTypeInferrer.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java b/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java index b8d3505120c..a13080a35f1 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java @@ -1,5 +1,6 @@ package org.jetbrains.jet.lang.types; +import com.google.common.collect.ImmutableMap; import com.intellij.psi.PsiElement; import com.intellij.psi.tree.IElementType; import org.jetbrains.annotations.NotNull; @@ -19,14 +20,13 @@ import java.util.*; */ public class JetTypeInferrer { - private static final Map unaryOperationNames = new HashMap(); - static { - unaryOperationNames.put(JetTokens.PLUSPLUS, "inc"); - unaryOperationNames.put(JetTokens.MINUSMINUS, "dec"); - unaryOperationNames.put(JetTokens.PLUS, "plus"); - unaryOperationNames.put(JetTokens.MINUS, "minus"); - unaryOperationNames.put(JetTokens.EXCL, "not"); - } + private static final Map unaryOperationNames = ImmutableMap.builder() + .put(JetTokens.PLUSPLUS, "inc") + .put(JetTokens.MINUSMINUS, "dec") + .put(JetTokens.PLUS, "plus") + .put(JetTokens.MINUS, "minus") + .put(JetTokens.EXCL, "not") + .build(); private static final Map binaryOperationNames = new HashMap(); static {