Skip to content

Commit

Permalink
move TreeNode (#22545)
Browse files Browse the repository at this point in the history
  • Loading branch information
colesnodgrass authored Feb 8, 2023
1 parent 03da6c6 commit 577be93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import io.airbyte.db.jdbc.JdbcUtils;
import io.airbyte.protocol.models.CommonField;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.TreeNode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -50,7 +49,13 @@
import org.bson.BsonTimestamp;
import org.bson.BsonType;
import org.bson.Document;
import org.bson.codecs.*;
import org.bson.codecs.BsonCodecProvider;
import org.bson.codecs.BsonValueCodecProvider;
import org.bson.codecs.DocumentCodecProvider;
import org.bson.codecs.IterableCodecProvider;
import org.bson.codecs.JsonObjectCodecProvider;
import org.bson.codecs.MapCodecProvider;
import org.bson.codecs.ValueCodecProvider;
import org.bson.codecs.configuration.CodecRegistry;
import org.bson.codecs.jsr310.Jsr310CodecProvider;
import org.bson.types.Decimal128;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
*/

package io.airbyte.protocol.models;
package io.airbyte.db.mongodb;

import java.util.LinkedList;
import java.util.List;
Expand All @@ -13,13 +13,13 @@ public class TreeNode<T> {
private TreeNode<T> parent;
private List<TreeNode<T>> children;

public TreeNode(T data) {
public TreeNode(final T data) {
this.data = data;
this.children = new LinkedList<>();
}

public TreeNode<T> addChild(T child) {
TreeNode<T> childNode = new TreeNode<T>(child);
public TreeNode<T> addChild(final T child) {
final TreeNode<T> childNode = new TreeNode<T>(child);
childNode.parent = this;
this.children.add(childNode);
return childNode;
Expand All @@ -33,23 +33,23 @@ public T getData() {
return data;
}

public void setData(T data) {
public void setData(final T data) {
this.data = data;
}

public TreeNode<T> getParent() {
return parent;
}

public void setParent(TreeNode<T> parent) {
public void setParent(final TreeNode<T> parent) {
this.parent = parent;
}

public List<TreeNode<T>> getChildren() {
return children;
}

public void setChildren(List<TreeNode<T>> children) {
public void setChildren(final List<TreeNode<T>> children) {
this.children = children;
}

Expand Down

0 comments on commit 577be93

Please sign in to comment.