<commit_before>package de.diddiz.utils.collections;

import java.util.LinkedList;
import java.util.List;

public class TreeNode<T>
{
	private final T value;
	private TreeNode<T> parent;
	final private List<TreeNode<T>> children = new LinkedList<>();

	public TreeNode(T value) {
		this.value = value;
	}

	public void addChild(TreeNode<T> child) {
		children.add(child);
		child.parent = this;
	}

	public void addChildren(Iterable<TreeNode<T>> newChildren) {
		for (final TreeNode<T> child : newChildren)
			addChild(child);
	}

	public void addChildren(TreeNode<T>[] newChildren) {
		for (final TreeNode<T> child : newChildren)
			addChild(child);
	}

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

	public T getValue() {
		return value;
	}
}<commit_msg>Added TreeNode.toString();<commit_after>package de.diddiz.utils.collections;

import java.util.LinkedList;
import java.util.List;

public class TreeNode<T>
{
	private final T value;
	private TreeNode<T> parent;
	final private List<TreeNode<T>> children = new LinkedList<>();

	public TreeNode(T value) {
		this.value = value;
	}

	public void addChild(TreeNode<T> child) {
		children.add(child);
		child.parent = this;
	}

	public void addChildren(Iterable<TreeNode<T>> newChildren) {
		for (final TreeNode<T> child : newChildren)
			addChild(child);
	}

	@SuppressWarnings("unchecked")
	public void addChildren(TreeNode<T>... newChildren) {
		for (final TreeNode<T> child : newChildren)
			addChild(child);
	}

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

	public T getValue() {
		return value;
	}

	@Override
	public String toString() {
		return "TreeNode [value=" + value + ", children=" + children + "]";
	}
}
{'fraction_non_alphanumeric': 0.13100177830468288, 'fraction_numerical': 0.0, 'mean_word_length': 4.589403973509934, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '244547', 'n_tokens_mistral': 610, 'n_tokens_neox': 575, 'n_words': 140}