Passing Of Objects in scala
===

Hey guys i am trying to pass an Object(type Object) that is a combination of a (string+object).
In the function i need to compare the the string with a hash map and accordingly do operations with the attached object.

The code goes like this

     Function (srt : Object)
    {
     //s is an array of Strings  
      var s = srt.toString.split("+")
      if(s[0]== insert)
        {
        var ne = s[1].asInstanceOf(USERDEFINEDCLASS) //ERROR here
       //do operations
        }
     }

         main()
           {
          var og : className = new className(parameters)
          Function(og ->("insert"))
           }

In this code i am getting the error saying it cannot be converted from string to the class object. 
 I am not able to figure out a way of doing it. Can someone help me with this 