Daily scala
A short daily dose of scala examples and occasionally explanations.
Showing posts with label
companion
.
Show all posts
Showing posts with label
companion
.
Show all posts
Wednesday, April 21, 2010
Companion Object Implicits
›
When a method requires an implicit there are several ways that the implicit is resolved. One way is to search for an implicit definition in...
3 comments:
Monday, November 2, 2009
Multiple Constructors
›
In Scala there is a primary constructor: class MyClass(constructorParam:Any) . Unlike Java, that constructor must be called. The questio...
Monday, September 14, 2009
Factory Methods and Companion Objects
›
One of the most common uses of a companion object (See Companion Objects for more) is as a factory for creating instances of the class. For...
Wednesday, September 9, 2009
Companion Object
›
A companion object is an object with the same name as a class or trait and is defined in the same source file as the associated file or trai...
10 comments:
›
Home
View web version