01: /* This file was generated by SableCC (http://www.sablecc.org/). */
02:
03: package org.jmatlab.node;
04:
05: import java.util.*;
06: import org.jmatlab.analysis.*;
07:
08: public final class AImaginaryImaginaryLiteral extends PImaginaryLiteral {
09: private TImaginaryNumber _imaginaryNumber_;
10:
11: public AImaginaryImaginaryLiteral() {
12: }
13:
14: public AImaginaryImaginaryLiteral(TImaginaryNumber _imaginaryNumber_) {
15: setImaginaryNumber(_imaginaryNumber_);
16:
17: }
18:
19: public Object clone() {
20: return new AImaginaryImaginaryLiteral(
21: (TImaginaryNumber) cloneNode(_imaginaryNumber_));
22: }
23:
24: public void apply(Switch sw) {
25: ((Analysis) sw).caseAImaginaryImaginaryLiteral(this );
26: }
27:
28: public TImaginaryNumber getImaginaryNumber() {
29: return _imaginaryNumber_;
30: }
31:
32: public void setImaginaryNumber(TImaginaryNumber node) {
33: if (_imaginaryNumber_ != null) {
34: _imaginaryNumber_.parent(null);
35: }
36:
37: if (node != null) {
38: if (node.parent() != null) {
39: node.parent().removeChild(node);
40: }
41:
42: node.parent(this );
43: }
44:
45: _imaginaryNumber_ = node;
46: }
47:
48: public String toString() {
49: return "" + toString(_imaginaryNumber_);
50: }
51:
52: void removeChild(Node child) {
53: if (_imaginaryNumber_ == child) {
54: _imaginaryNumber_ = null;
55: return;
56: }
57:
58: }
59:
60: void replaceChild(Node oldChild, Node newChild) {
61: if (_imaginaryNumber_ == oldChild) {
62: setImaginaryNumber((TImaginaryNumber) newChild);
63: return;
64: }
65:
66: }
67: }
|