public <T> T getRandomItem(List<T> options) {
		checkArgument(!options.isEmpty(), "Options must not be empty");
		if (options.size() == 1) {
			return options.get(0);
		} else {
			return options.get(random.nextInt(options.size() - 1));
		}
	}
public < T > T getRandomItem ( List < T > options ) { checkArgument ( ! options . isEmpty ( ) , "Options must not be empty" ) ; if ( options . size ( ) == 1 ) { return options . get ( 0 ) ; } else { return options . get ( random . nextInt ( options . size ( ) - 1 ) ) ; } }
@param options the possible options (e.g. option item in select). The list must be non-empty
@return a random item from the list