blob: c87ec96b09d0acc52591e083a37d5c524a86c7c3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
package hbt
import java.nio.{file => jnio}
class Args(val args: IndexedSeq[_], val dest: jnio.Path){
def length = args.length
def apply[T](index: Int): T = {
if (index >= 0 && index < args.length) args(index).asInstanceOf[T]
else throw new IndexOutOfBoundsException(s"Index $index outside of range 0 - ${args.length}")
}
}
|