<commit_before>package com.miviclin.collections;

import java.util.AbstractQueue;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * This queue is implemented like a linked list. The main difference is that this queue uses a pool of nodes, so it does
 * not need to create new nodes if there are nodes available in the pool.<br>
 * This queue does not allow null objects.
 * 
 * @author <NAME>
 * 
 * @param <E>
 */
public class PooledLinkedQueue<E> extends AbstractQueue<E> {

	private Node<E> head;
	private Node<E> tail;
	private int size;
	private ArrayList<Node<E>> nodePool;

	/**
	 * Creates a new PooledLinkedQueue with 10 pooled nodes.
	 */
	public PooledLinkedQueue() {
		this(10);
	}

	/**
	 * Creates a new PooledLinkedQueue with the specified initial number of pooled nodes.<commit_msg>Fix javadoc in PooledLinkedQueue<commit_after>package com.miviclin.collections;

import java.util.AbstractQueue;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * This queue is implemented as a linked list. The main difference is that this queue has a pool of nodes, so it does
 * not need to create new nodes if there are nodes available in the pool.<br>
 * This queue does not allow null objects.
 * 
 * @author <NAME>
 * 
 * @param <E>
 */
public class PooledLinkedQueue<E> extends AbstractQueue<E> {

	private Node<E> head;
	private Node<E> tail;
	private int size;
	private ArrayList<Node<E>> nodePool;

	/**
	 * Creates a new PooledLinkedQueue with 10 pooled nodes.
	 */
	public PooledLinkedQueue() {
		this(10);
	}

	/**
	 * Creates a new PooledLinkedQueue with the specified initial number of pooled nodes.
{'fraction_non_alphanumeric': 0.09198113207547169, 'fraction_numerical': 0.0047169811320754715, 'mean_word_length': 4.080838323353293, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3828427', 'n_tokens_mistral': 523, 'n_tokens_neox': 492, 'n_words': 198}