Package net.sf.tweety.lp.asp.parser
Class SimpleNode
- java.lang.Object
-
- net.sf.tweety.lp.asp.parser.SimpleNode
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
ASTAggregate,ASTAggrElement,ASTAggrElementList,ASTAggrFunc,ASTAnswerSet,ASTAriTerm,ASTArithop,ASTBinop,ASTBody,ASTBodyList,ASTBuiltInAtom,ASTChoice,ASTChoiceElement,ASTChoiceElementList,ASTClingoMeta,ASTHead,ASTHeadElementsList,ASTID,ASTLiteral,ASTNAFLiteral,ASTNAFLiteralList,ASTNumber,ASTOpt,ASTOptElement,ASTOptElementList,ASTOptFunc,ASTProgram,ASTQuery,ASTRule,ASTRuleList,ASTString,ASTTerm,ASTTermList,ASTVar,ASTWeight
public class SimpleNode extends java.lang.Object implements Node
-
-
Constructor Summary
Constructors Constructor Description SimpleNode(int i)SimpleNode(ASPCore2Parser p, int i)
-
Method Summary
Modifier and Type Method Description java.lang.ObjectchildrenAccept(ASPCore2ParserVisitor visitor, java.lang.Object data)voiddump(java.lang.String prefix)java.lang.ObjectjjtAccept(ASPCore2ParserVisitor visitor, java.lang.Object data)voidjjtAddChild(Node n, int i)voidjjtClose()This method is called after all the child nodes have been added.NodejjtGetChild(int i)intjjtGetNumChildren()NodejjtGetParent()java.lang.ObjectjjtGetValue()voidjjtOpen()This method is called after the node has been made the current node.voidjjtSetParent(Node n)voidjjtSetValue(java.lang.Object value)java.lang.StringtoString()java.lang.StringtoString(java.lang.String prefix)
-
-
-
Field Detail
-
parent
protected Node parent
-
children
protected Node[] children
-
id
protected int id
-
value
protected java.lang.Object value
-
parser
protected ASPCore2Parser parser
-
-
Constructor Detail
-
SimpleNode
public SimpleNode(int i)
-
SimpleNode
public SimpleNode(ASPCore2Parser p, int i)
-
-
Method Detail
-
jjtOpen
public void jjtOpen()
Description copied from interface:NodeThis method is called after the node has been made the current node. It indicates that child nodes can now be added to it.
-
jjtClose
public void jjtClose()
Description copied from interface:NodeThis method is called after all the child nodes have been added.
-
jjtSetParent
public void jjtSetParent(Node n)
- Specified by:
jjtSetParentin interfaceNode
-
jjtGetParent
public Node jjtGetParent()
- Specified by:
jjtGetParentin interfaceNode
-
jjtAddChild
public void jjtAddChild(Node n, int i)
- Specified by:
jjtAddChildin interfaceNode
-
jjtGetChild
public Node jjtGetChild(int i)
- Specified by:
jjtGetChildin interfaceNode
-
jjtGetNumChildren
public int jjtGetNumChildren()
- Specified by:
jjtGetNumChildrenin interfaceNode
-
jjtSetValue
public void jjtSetValue(java.lang.Object value)
-
jjtGetValue
public java.lang.Object jjtGetValue()
-
jjtAccept
public java.lang.Object jjtAccept(ASPCore2ParserVisitor visitor, java.lang.Object data)
-
childrenAccept
public java.lang.Object childrenAccept(ASPCore2ParserVisitor visitor, java.lang.Object data)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String prefix)
-
dump
public void dump(java.lang.String prefix)
-
-