1 28 29 package org.jruby.ast.visitor.rewriter.utils; 30 31 import java.util.HashSet ; 32 33 public class Operators { 34 35 private static HashSet operatorSet = new HashSet (); 36 static { 37 String [] operators = new String [] { "**", "<=>", "==", "=~", "===", ">=", "<=", "&", "%", 38 "/", "+", "-", "*", "<", ">", "<<", ">>", "|"}; 39 40 for(int i = 0; i < operators.length; i++) { 41 operatorSet.add(operators[i]); 42 } 43 } 44 45 public static boolean contain(String name) { 46 return operatorSet.contains(name); 47 } 48 } | Popular Tags |