<commit_before>
package com.badlogic.gdx.scenes.scene2d.utils;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.utils.Array;

/** A selection that supports range selection by knowing about the array of items being selected. */
public class ArraySelection<T> extends Selection<T> {
	private Array<T> items;
	private boolean rangeSelect = true;

	public ArraySelection (Array<T> items) {
		this.items = items;
	}

	public void choose (T item) {
		if (isDisabled) return;
		if (selected.size > 0 && rangeSelect && multiple
			&& (Gdx.input.isKeyPressed(Keys.SHIFT_LEFT) || Gdx.input.isKeyPressed(Keys.SHIFT_RIGHT))) {
			int low = items.indexOf(getLastSelected(), false);
			int high = items.indexOf(item, false);<commit_msg>Javadoc<commit_after>
package com.badlogic.gdx.scenes.scene2d.utils;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.utils.Array;

/** A selection that supports range selection by knowing about the array of items being selected.
 * @author <NAME> */
public class ArraySelection<T> extends Selection<T> {
	private Array<T> items;
	private boolean rangeSelect = true;

	public ArraySelection (Array<T> items) {
		this.items = items;
	}

	public void choose (T item) {
		if (isDisabled) return;
		if (selected.size > 0 && rangeSelect && multiple
			&& (Gdx.input.isKeyPressed(Keys.SHIFT_LEFT) || Gdx.input.isKeyPressed(Keys.SHIFT_RIGHT))) {
			int low = items.indexOf(getLastSelected(), false);
			int high = items.indexOf(item, false);
{'fraction_non_alphanumeric': 0.1235370611183355, 'fraction_numerical': 0.002600780234070221, 'mean_word_length': 4.678966789667896, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, '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': '6743491', 'n_tokens_mistral': 531, 'n_tokens_neox': 497, 'n_words': 131}