cdurham
08/01/2017, 3:33 PMfun Foo(stringValue: String): Foo {
// .. do work and return foo
}
class Foo(val first: Int, val second: Int) {
init {
if (first !in 1..10) {
throw IllegalArgumentException("first must be between 1 and 10")
}
if (second !in 22..33) {
throw IllegalArgumentException("second must be between 22 and 33")
}
}
}