validateButAtMost

fun validateButAtMost(atLeastTimes: Int, butAtMostTimes: Int, atLeastButAtMostCall: (Int, Int) -> String, atLeastCall: (Int) -> String, butAtMostCall: (Int) -> String, exactlyCall: (Int) -> String)(source)

Validates that atLeastTimes is not equal to or greater than butAtMostTimes; throws an IllegalArgumentException otherwise, pointing the user to use the given exactlyCall in case atLeastTimes equals butAtMostTimes.

Throws

in case atLeastTimes is equal or greater than butAtMostTimes