A trait
is similar to a Java interface in a sense that it is not a concrete constructor.
From Scala:
class IndexImpl extends Index[SomeParamtersHere] {}
val x = new ClassImpl
x.make(..)
Or use an object:
object Index extends Index {}
Index.make(..)
From Java:
Traits with concrete implementations will compile to the appropriate abstract class
. If certain members don't have concrete implementation, you have to implement them.
import org.saddle.Index
public class TraitImpl extends Index$class {
}