blob: c87ec96b09d0acc52591e083a37d5c524a86c7c3 (
plain) (
tree)
|
|
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}")
}
}
|