package com.drumonii.loltrollbuild.util;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.RandomUtils;

import java.util.List;

/**
 * Utility methods for randomizing.
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class RandomizeUtil {

	/**
	 * Gets a random element {@code E} from the passed {@link List}.
	 *
	 * @param list the {@link List} to get the random element
	 * @param <E> the element type
	 * @return a random element from the {@link List}
	 */
	public static <E> E getRandom(List<E> list) {
		return list.get(RandomUtils.nextInt(0, list.size()));
	}

	/**
	 * Gets a random element {@code E} from the passed {@link List} and removes the chosen element from the list.
	 *
	 * @param list the {@link List} to get and remove the random element
	 * @param <E> the element type
	 * @return a random element from the {@link List}
	 */
	public static <E> E getRandomAndRemove(List<E> list) {
		int randomInt = RandomUtils.nextInt(0, list.size());
		E element = list.get(randomInt);
		list.remove(randomInt);
		return element;
	}

}

@@ -621,478 +621,6 @@
 %09%7D%0A%0A
-%09/**%0A%09 * Gets a random element %7B@code E%7D from the passed %7B@link List%7D and removes the chosen element from the list.%0A%09 *%0A%09 * @param list the %7B@link List%7D to get and remove the random element%0A%09 * @param %3CE%3E the element type%0A%09 * @return a random element from the %7B@link List%7D%0A%09 */%0A%09public static %3CE%3E E getRandomAndRemove(List%3CE%3E list) %7B%0A%09%09int randomInt = RandomUtils.nextInt(0, list.size());%0A%09%09E element = list.get(randomInt);%0A%09%09list.remove(randomInt);%0A%09%09return element;%0A%09%7D%0A%0A
 %7D%0A

Remove unused method in RandomizeUtil