There are some situations that arise where you want default arguments in object apply
methods, but you also want to overload the apply
. For instance, in GeoTrellis, we have an S3LayerWriter
which allows you to write an RDD of rasters out of Amazon's S3 storage backend. In order to operate, it needs an AttributeStore, which is the type responsible for reading and writing metadata. A simplified (not real) signature of the attribute store looks like
case class AttributeStore(bucket: String, prefix: String)