Using Apply and Unapply Methods in Scala