Vertex {(@ boolean equals(Vertex a) { String one,two; one=this.tostring(); two=a.tostring(); return (one.equals(two)); } String tostring() {return this.get_vertex_name().toString();} @) } Vertex { (@ public boolean isTerminalClass() { return isTerminalClass(this.get_vertex_name().toString()); } public static boolean isTerminalClass(String x) { String checkset[] = { "Boolean", "Character", "Integer", "Long", "Float", "Double", "String", "Ident", "int" , "float", "double", "boolean" }; for (int i = 0; i < checkset.length; i++) { if (checkset[i].equals(x)) return true; } return false; } @) }