org.lsst.ccs.shell
Class Token
java.lang.Object
org.lsst.ccs.shell.Token
public class Token
- extends Object
Token associates index of a token in the input line with the token itself,
in order to be able to provide helpful error indecation (see below :)
------------------------------------------------^ Misspelled word! (Exactly how it should work).
This class is immutable.
Parsing procedural module is also within.
Token
public Token(int index,
String string)
getIndex
public final int getIndex()
getString
public final String getString()
toString
public String toString()
- Overrides:
toString in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
escapeString
public static String escapeString(String input)
- Escape given string so that tokenize(escapeString(str)).get(0).getString === str.
- Parameters:
input - String to be escaped
- Returns:
- escaped string
Copyright © 2013 LSST. All Rights Reserved.