Skip to content

Latest commit

 

History

History
112 lines (75 loc) · 1.48 KB

File metadata and controls

112 lines (75 loc) · 1.48 KB

Node Class

: Returns a string representation of the AST

Since

3/23/2024

Group Soql Engine

Author Zackary Frazier

Fields

left

Signature

public left

Type

Node


right

Signature

public right

Type

Node

Properties

id

The id of the node, cannot be null

Signature

public id

Type

String


nodeType

The type of the node, cannot be null

Signature

public nodeType

Type

String

Constructors

Node(nodeType, id, left, right)

SUPPRESSWARNINGS

: Constructor for a Node, not to be used directly

Signature

public Node(String nodeType, string id, Node left, Node right)

Parameters

Name Type Description
nodeType String : String, the type of the node
id string : String, the id of the node
left Node : Node, the left child of the node
right Node : Node, the right child of the node

Methods

deepClone()

: Clones a node and all of its children, recursively

Signature

public Node deepClone()

Return Type

Node

: Node, the cloned tree


toString()

: Returns a string representation of the node by traversing the tree in pre-order

Signature

public override String toString()

Return Type

String

: String, the string representation of the node