Scala Find Method Syntax -


val underlying: mongodbcollection def find(doc: dbobject): dbcursor = underlying find doc 

here's hypothetical program. apparently valid implementation of find method, don't understand how method body underlying find doc produce value. how find method evaluate doc parameter, , how underlying variable affecting anything? why not find doc underlying or find doc method body?

when method takes 1 parameter, can omit both prefix . , brace () when calling method on object.

underlying find doc 

is same

underlying.find(doc) 

it calls find method on mongodbcollection instance underlying doc parameter.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -