私はscalaを初めて使っています。地図が変更されるたびに通知を受けたい。これは観測可能な地図を使って行うことができると思いました。observablemap in scala
私は
var myObj = new Map[UUID, MyType] with ObservableMap[UUID,MyType]
以下のようなオブジェクトを定義しようとしていますが、なぜそうなのか、それは
error: object creation impossible, since:
method iterator in trait MapLike of type => Iterator[(java.util.UUID, MyType)] is not defined
method get in trait MapLike of type (key: java.util.UUID)Option[MyType] is not defined
method -= in trait ObservableMap of type (key: java.util.UUID)this.type is marked `abstract' and `override', but no concrete implementation could be found in a base class
method += in trait ObservableMap of type (kv: (java.util.UUID, MyType))this.type is marked `abstract' and `override', but no concrete implementation could be found in a base class
...と言ってコンパイルされませんか? ObservableMapをどのようにインスタンス化しますか?
OK..thatはおそらくsilly..Iは –