<commit_before>/*
 * jlib - The Free Java Library
 * 
 * http://www.jlib.org
 * 
 * Copyright (c) 2006-2008 <NAME>
 * 
 * jlib is distributed under the
 * 
 * COMMON PUBLIC LICENSE VERSION 1.0
 * 
 * http://www.opensource.org/licenses/cpl1.0.php
 */

package org.jlib.container.sequence;


/**
 * Traverser over a {@link InsertSequence}.
 * 
 * @param <Item>
 *        type of items held in the {@link Sequence}
 * 
 * @author <NAME>
 */
public interface InsertSequenceTraverser<Item>
extends SequenceTraverser<Item> {

    /**
     * <p>
     * Inserts the specified Item into the sequence at the current position
     * of this Traverser.
     * </p>
     * <p>
     * The Item is inserted immediately before the next Item that would
     * have been returned by {@link #getNextItem()} and immediately after the previous
     * Item that would have been returned by {@link #getPreviousItem()}.
     * </p>
     * <p>
     * A subsequent call to {@link #getNextItem()} would be unaffected, and a
     * subsequent call to {@link #getPreviousItem()} would return the new item.
     * </p>
     * 
     * @param item
     *        Item to insert
     * 
     * @throws IllegalStateException
     *         if {@link #getNextItem()} or {@link #getPreviousItem()} have not been called
     *         initially or after the last call to {@link #insert(Object)}
     */
    public void insert(Item item)
    throws IllegalStateException;
}
<commit_msg>InsertSequenceTraverser: Javadoc and signature optimized<commit_after>/*
 * jlib - The Free Java Library
 * 
 * http://www.jlib.org
 * 
 * Copyright (c) 2006-2008 <NAME>
 * 
 * jlib is distributed under the
 * 
 * COMMON PUBLIC LICENSE VERSION 1.0
 * 
 * http://www.opensource.org/licenses/cpl1.0.php
 */

package org.jlib.container.sequence;

import org.jlib.container.sequence.index.IndexSequenceTraverser;

/**
 * {@link SequenceTraverser} over a {@link InsertSequence}.
 * 
 * @param <Item>
 *        type of items held in the {@link Sequence}
 * 
 * @author <NAME>
 */
public interface InsertSequenceTraverser<Item>
extends SequenceTraverser<Item> {

    /**
     * <p>
     * Inserts the specified Item into the sequence at the current position of
     * this {@link IndexSequenceTraverser}.
     * </p>
     * <p>
     * The Item is inserted immediately before the next Item that would have
     * been returned by {@link #getNextItem()} and immediately after the
     * previous Item that would have been returned by {@link #getPreviousItem()}
     * .
     * </p>
     * <p>
     * A subsequent call to {@link #getNextItem()} would be unaffected, and a
     * subsequent call to {@link #getPreviousItem()} would return the new item.
     * </p>
     * 
     * @param newItem
     *        new Item to insert
     * 
     * @throws IllegalStateException
     *         if {@link #getNextItem()} or {@link #getPreviousItem()} have not
     *         been called initially or after the last call to
     *         {@link #insert(Object)}
     */
    public void insert(final Item newItem)
    throws IllegalStateException;
}

{'fraction_non_alphanumeric': 0.11143599740090968, 'fraction_numerical': 0.007797270955165692, 'mean_word_length': 2.6351829988193622, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '7324917', 'n_tokens_mistral': 937, 'n_tokens_neox': 899, 'n_words': 310}