69
import java.io.IOException;
71
import org.hsqldb.rowio.RowOutputInterface;
74
* Common MEMORY and TEXT table node implementation. Nodes are always in
75
* memory so an Object reference is used to access the other Nodes in the
78
* New class derived from the Hypersonic code
80
* @author Thomas Mueller (Hypersonic SQL Group)
82
* @since Hypersonic SQL
84
abstract class BaseMemoryNode extends Node {
87
protected Node nRight;
88
protected Node nParent;
92
nLeft = nRight = nParent = null;
95
Node getLeft() throws HsqlException {
98
Trace.doAssert(iBalance != -2);
104
void setLeft(Node n) throws HsqlException {
106
if (Trace.DOASSERT) {
107
Trace.doAssert(iBalance != -2);
113
Node getRight() throws HsqlException {
115
if (Trace.DOASSERT) {
116
Trace.doAssert(iBalance != -2);
122
void setRight(Node n) throws HsqlException {
124
if (Trace.DOASSERT) {
125
Trace.doAssert(iBalance != -2);
131
Node getParent() throws HsqlException {
133
if (Trace.DOASSERT) {
134
Trace.doAssert(iBalance != -2);
141
return nParent == null;
144
void setParent(Node n) throws HsqlException {
146
if (Trace.DOASSERT) {
147
Trace.doAssert(iBalance != -2);
153
void setBalance(int b) throws HsqlException {
155
if (Trace.DOASSERT) {
156
Trace.doAssert(iBalance != -2);
162
boolean isFromLeft() throws HsqlException {
168
Node parent = getParent();
170
if (Trace.DOASSERT) {
171
Trace.doAssert(parent != null);
174
return equals(parent.getLeft());
177
boolean equals(Node n) {
181
void write(RowOutputInterface out) throws IOException {}
69
import java.io.IOException;
71
import org.hsqldb.rowio.RowOutputInterface;
74
* Common MEMORY and TEXT table node implementation. Nodes are always in
75
* memory so an Object reference is used to access the other Nodes in the
78
* New class derived from the Hypersonic code
80
* @author Thomas Mueller (Hypersonic SQL Group)
82
* @since Hypersonic SQL
84
abstract class BaseMemoryNode extends Node {
87
protected Node nRight;
88
protected Node nParent;
92
nLeft = nRight = nParent = null;
95
Node getLeft() throws HsqlException {
98
Trace.doAssert(iBalance != -2);
104
void setLeft(Node n) throws HsqlException {
106
if (Trace.DOASSERT) {
107
Trace.doAssert(iBalance != -2);
113
boolean isLeft(Node node) throws HsqlException {
114
return nLeft == node;
117
boolean isRight(Node node) throws HsqlException {
118
return nRight == node;
121
Node getRight() throws HsqlException {
123
if (Trace.DOASSERT) {
124
Trace.doAssert(iBalance != -2);
130
void setRight(Node n) throws HsqlException {
132
if (Trace.DOASSERT) {
133
Trace.doAssert(iBalance != -2);
139
Node getParent() throws HsqlException {
141
if (Trace.DOASSERT) {
142
Trace.doAssert(iBalance != -2);
149
return nParent == null;
152
void setParent(Node n) throws HsqlException {
154
if (Trace.DOASSERT) {
155
Trace.doAssert(iBalance != -2);
161
void setBalance(int b) throws HsqlException {
163
if (Trace.DOASSERT) {
164
Trace.doAssert(iBalance != -2);
170
boolean isFromLeft() throws HsqlException {
176
Node parent = getParent();
178
if (Trace.DOASSERT) {
179
Trace.doAssert(parent != null);
182
return equals(parent.getLeft());
185
boolean equals(Node n) {
189
void write(RowOutputInterface out) throws IOException {}