jdk/src/share/classes/sun/tools/jstat/Parser.java
changeset 24871 224e298c3978
parent 5506 202f599c92aa
equal deleted inserted replaced
24870:5d567113d043 24871:224e298c3978
    61     private static final String ALIGN = "align";
    61     private static final String ALIGN = "align";
    62     private static final String SCALE = "scale";
    62     private static final String SCALE = "scale";
    63 
    63 
    64     private static final String START = OPTION;
    64     private static final String START = OPTION;
    65 
    65 
    66     private static final Set scaleKeyWords = Scale.keySet();
    66     private static final Set<String> scaleKeyWords = Scale.keySet();
    67     private static final Set alignKeyWords = Alignment.keySet();
    67     private static final Set<String> alignKeyWords = Alignment.keySet();
    68     private static String[] otherKeyWords = {
    68     private static String[] otherKeyWords = {
    69         OPTION, COLUMN, DATA, HEADER, WIDTH, FORMAT, ALIGN, SCALE
    69         OPTION, COLUMN, DATA, HEADER, WIDTH, FORMAT, ALIGN, SCALE
    70     };
    70     };
    71 
    71 
    72     private static char[] infixOps = {
    72     private static char[] infixOps = {
   139     /**
   139     /**
   140      * match one of the token values in the given set of key words
   140      * match one of the token values in the given set of key words
   141      * token is assumed to be of type TT_WORD, and the set is assumed
   141      * token is assumed to be of type TT_WORD, and the set is assumed
   142      * to contain String objects.
   142      * to contain String objects.
   143      */
   143      */
   144     private Token matchOne(Set keyWords) throws ParserException, IOException {
   144     private Token matchOne(Set<String> keyWords) throws ParserException, IOException {
   145         if ((lookahead.ttype == StreamTokenizer.TT_WORD)
   145         if ((lookahead.ttype == StreamTokenizer.TT_WORD)
   146                 && keyWords.contains(lookahead.sval)) {
   146                 && keyWords.contains(lookahead.sval)) {
   147             Token t = lookahead;
   147             Token t = lookahead;
   148             nextToken();
   148             nextToken();
   149             return t;
   149             return t;