jtl-eclipse-master/ASPM.resource.aspm/src-gen/ASPM/resource/aspm/mopp/AspmExpectedCsString.java
/**
 * <copyright>
 * </copyright>
 *
 * 
 */
package ASPM.resource.aspm.mopp;

/**
 * A representation for a range in a document where a keyword (i.e., a static
 * string) is expected.
 */
public class AspmExpectedCsString extends ASPM.resource.aspm.mopp.AspmAbstractExpectedElement {
	
	private ASPM.resource.aspm.grammar.AspmKeyword keyword;
	
	public AspmExpectedCsString(ASPM.resource.aspm.grammar.AspmKeyword keyword) {
		super(keyword.getMetaclass());
		this.keyword = keyword;
	}
	
	public String getValue() {
		return keyword.getValue();
	}
	
	/**
	 * Returns the expected keyword.
	 */
	public ASPM.resource.aspm.grammar.AspmSyntaxElement 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 AspmExpectedCsString) {
			return getValue().equals(((AspmExpectedCsString) o).getValue());
		}
		return false;
	}
	
	@Override	
	public int hashCode() {
		return getValue().hashCode();
	}
	
}
