Hello, I was wondering how to apply a match and case to my act() method. This is my tempObject class
case class tempObject(typeOfData: Int) {}
And this is my Actor:
object StorageActor extends Actor {
def act(TO: tempObject) = TO match {
case TO(0) => println("True")
case TO(1) => println("False")
}
}
So, what should happen is, when I pass an object to act(), it calls the desired method, depending upon the values inside of the object. Is the above code correct to perform what I desire?