@@ -352,13 +352,11 @@ public Decision optimize(Map<String, ?> variants) {
352352 * @param variants See chooseFrom().
353353 * When the only argument is a List, it's equivalent to calling
354354 * chooseFrom(variants).get();
355- * When the only argument is a Map, it's equivalent to calling
356- * optimize(variants).get();
357355 * When there are two or more arguments, all the arguments would form a
358356 * list and be passed to chooseFrom();
359357 * @return Returns the chosen variant
360- * @throws IllegalArgumentException Thrown if variants is null or empty; or if there's only one
361- * variant and it's not a List or Map .
358+ * @throws IllegalArgumentException Thrown if variants is null or empty; Thrown if there's only one
359+ * variant and it's not a List.
362360 * */
363361 public Object which (Object ... variants ) {
364362 return given (null ).which (variants );
@@ -379,7 +377,7 @@ public <T> Decision<T> chooseFirst(List<T> variants) {
379377 * This is a short hand of chooseFirst().get().
380378 * @param variants See chooseFrom(). If only one argument, it must be a non-empty list.
381379 * @return If multiple arguments is passed to first(), the first argument would be returned;
382- * If only one argument(a non-empty list), then the fist member of it would be returned.
380+ * If only one argument(a nonempty list), then the fist member of it would be returned.
383381 * @throws IllegalArgumentException Thrown if variants is null; Thrown if variants is empty;
384382 * Thrown if the there's only one argument and it's not a non-empty list.
385383 */
@@ -398,7 +396,7 @@ public <T> Decision<T> chooseRandom(List<T> variants) {
398396
399397 /**
400398 * A shorthand of chooseRandom(variants).get()
401- * @param variants See chooseFrom(). If only one argument, it must be a non-empty list. Expect
399+ * @param variants See chooseFrom(). If only one argument, it must be a nonempty list. Expect
402400 * at least one argument.
403401 * @return A random variant.
404402 * @throws IllegalArgumentException Thrown if variants is empty or null; Thrown if there's only
0 commit comments