/**
* <copyright>
* </copyright>
*
*
*/
package robot.resource.robot.mopp;
/**
* A representation for a range in a document where a keyword (i.e., a static
* string) is expected.
*/
public class RobotExpectedCsString extends robot.resource.robot.mopp.RobotAbstractExpectedElement {
private robot.resource.robot.grammar.RobotKeyword keyword;
public RobotExpectedCsString(robot.resource.robot.grammar.RobotKeyword keyword) {
super(keyword.getMetaclass());
this.keyword = keyword;
}
public String getValue() {
return keyword.getValue();
}
/**
* Returns the expected keyword.
*/
public robot.resource.robot.grammar.RobotSyntaxElement getSymtaxElement() {
return keyword;
}
public java.util.Set<String> getTokenNames() {
return java.util.Collections.singleton("'" + getValue() + "'");
}
public String toString() {
return "CsString \"" + getValue() + "\"";
}
public boolean equals(Object o) {
if (o instanceof RobotExpectedCsString) {
return getValue().equals(((RobotExpectedCsString) o).getValue());
}
return false;
}
@Override
public int hashCode() {
return getValue().hashCode();
}
}