CharacterTypeNode.java

package edu.udel.cis.vsl.tass.ast.impl.type;

import java.io.PrintWriter;
import java.util.NoSuchElementException;

import edu.udel.cis.vsl.tass.ast.IF.ASTNodeIF;
import edu.udel.cis.vsl.tass.ast.IF.type.CharacterTypeNodeIF;
import edu.udel.cis.vsl.tass.ast.impl.ASTNode;

public class CharacterTypeNode extends ASTNode implements CharacterTypeNodeIF {

	public CharacterTypeNode(long id) {
		super(id);
	}

	@Override
	public int numChildren() {
		return 0;
	}

	@Override
	public void setChild(int i, ASTNodeIF child) throws NoSuchElementException {
		throw new NoSuchElementException("Node " + id()
				+ " does not have a child with index " + i + ".");
	}

	@Override
	public ASTNodeIF child(int index) throws NoSuchElementException {
		throw new NoSuchElementException("Node " + id()
				+ " does not have a child with index " + index + ".");
	}

	@Override
	public String toString() {
		return "char";
	}

	@Override
	public void print(String prefix, PrintWriter out) {
		out.println(prefix + " AST Node " + id() + ", Character Type");
	}
}