Skip to content

Method: interpret(CommunicationManager)

1: package parser.nodes;
2:
3: public class IndexNode extends AbstractNode {
4:
5:         final private String value;
6:         
7:         public IndexNode(final String value) {
8:                 this.value = value;
9:         }
10:         
11:         @Override
12:         public String toString() {
13:                 return this.value;
14:         }
15:
16:         @Override
17:         public boolean equals(Object obj) {
18:                 return obj instanceof IndexNode
19:                                 && ((IndexNode) obj).toString().equals(this.toString());
20:         }
21:
22:         @Override
23:         public int hashCode() {
24:                 // TODO Auto-generated method stub
25:                 return 0;
26:         }
27:
28:         @Override
29:         public AbstractReturnValue interpret(CommunicationManager mgr) throws PruefscriptException {
30:                 return new StringValue(this.value);
31:         }
32:
33: }