static void checkParameters(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) {
if (numberOfTrials <= 0) {
throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_TRIALS, numberOfTrials);
}
if (numberOfSuccesses < 0) {
throw new NotPositiveException(LocalizedFormats.NEGATIVE_NUMBER_OF_SUCCESSES, numberOfSuccesses);
}
if (numberOfSuccesses > numberOfTrials) {
throw new NumberIsTooLargeException(LocalizedFormats.NUMBER_OF_SUCCESS_LARGER_THAN_POPULATION_SIZE,
numberOfSuccesses, numberOfTrials, true);
}