net.serenitybdd.screenplay.questions.AggregateQuestions Maven / Gradle / Ivy
package net.serenitybdd.screenplay.questions;
import net.serenitybdd.screenplay.Question;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
public class AggregateQuestions {
public static Question theTotalNumberOf(Question extends Collection> listQuestion) {
return new CountQuestion(listQuestion);
}
public static Question theSumOf(Question extends Collection> listQuestion) {
return new SumQuestion(listQuestion);
}
public static > Question theMaximumOf(Question extends Collection> listQuestion) {
return new MaxQuestion<>(listQuestion);
}
public static > Question theMaximumOf(Question extends Collection> listQuestion,
Comparator super T> comparator) {
return new MaxQuestion<>(listQuestion, comparator);
}
public static > Question theMinimumOf(Question extends Collection> listQuestion) {
return new MinQuestion<>(listQuestion);
}
public static > Question theMinimumOf(Question extends Collection> listQuestion,
Comparator super T> comparator) {
return new MinQuestion<>(listQuestion,comparator);
}
public static Question> theReverse(Question extends List> listQuestion) {
return new ReverseQuestion<>(listQuestion);
}
public static > Question> theSorted(Question extends List> listQuestion) {
return new SortedQuestion<>(listQuestion);
}
public static > Question> theSorted(Question extends List> listQuestion,
Comparator super T> comparator) {
return new SortedQuestion<>(listQuestion, comparator);
}
}