public static boolean isIdentifierKeyword(CharSequence text)
    {
        int pos = 0;
        int valuelen = text.length();

        if(valuelen == 0)
        {
            return false;
        }

        boolean keyword = false;

        // there has to be at least 1 character or we wouldn't be here
        switch (text.charAt(pos++)) {
        case '$':
            if (valuelen == 1) return false;
            while (pos < valuelen) {
                char c = text.charAt(pos++);
                if (! isDecimalDigit(c)) return false;
            }
            return true;
        case 'f':
            if (valuelen == 5 //      'f'
             && text.charAt(pos++) == 'a'
             && text.charAt(pos++) == 'l'
             && text.charAt(pos++) == 's'
             && text.charAt(pos++) == 'e'
            ) {
                keyword = true;
            }
            break;
        case 'n':
            if (valuelen == 4 //      'n'
             && text.charAt(pos++) == 'u'
             && text.charAt(pos++) == 'l'
             && text.charAt(pos++) == 'l'
            ) {
                keyword = true;
            }
            else if (valuelen == 3 // 'n'
             && text.charAt(pos++) == 'a'
             && text.charAt(pos++) == 'n'
            ) {
                keyword = true;
            }
            break;
        case 't':
            if (valuelen == 4 //      't'
             && text.charAt(pos++) == 'r'
             && text.charAt(pos++) == 'u'
             && text.charAt(pos++) == 'e'
            ) {
                keyword = true;
            }
            break;
        }

        return keyword;
    }
public static boolean isIdentifierKeyword ( CharSequence text ) { int pos = 0 ; int valuelen = text . length ( ) ; if ( valuelen == 0 ) { return false ; } boolean keyword = false ; switch ( text . charAt ( pos ++ ) ) { case '$' : if ( valuelen == 1 ) return false ; while ( pos < valuelen ) { char c = text . charAt ( pos ++ ) ; if ( ! isDecimalDigit ( c ) ) return false ; } return true ; case 'f' : if ( valuelen == 5 && text . charAt ( pos ++ ) == 'a' && text . charAt ( pos ++ ) == 'l' && text . charAt ( pos ++ ) == 's' && text . charAt ( pos ++ ) == 'e' ) { keyword = true ; } break ; case 'n' : if ( valuelen == 4 && text . charAt ( pos ++ ) == 'u' && text . charAt ( pos ++ ) == 'l' && text . charAt ( pos ++ ) == 'l' ) { keyword = true ; } else if ( valuelen == 3 && text . charAt ( pos ++ ) == 'a' && text . charAt ( pos ++ ) == 'n' ) { keyword = true ; } break ; case 't' : if ( valuelen == 4 && text . charAt ( pos ++ ) == 'r' && text . charAt ( pos ++ ) == 'u' && text . charAt ( pos ++ ) == 'e' ) { keyword = true ; } break ; } return keyword ; }
Determines whether the given text matches one of the Ion identifier
keywords <code>null</code>, <code>true</code>, or <code>false</code>.
<p>
This does <em>not</em> check for non-identifier keywords such as
<code>null.int</code>.

@param text the symbol to check.
@return <code>true</code> if the text is an identifier keyword.