Bob
Bob

Reputation: 8504

Scala return type

I have this as a return type in Scala

 Map[String, Seq[Map[String, Seq[MyClass]]]]

I have to use this in multiple places in my code, is there a way to assign this to a constant of sorts and use the constant instead of explicitly stating it?

Upvotes: 5

Views: 307

Answers (1)

drexin
drexin

Reputation: 24403

Yes, you can define a type alias with type Foo = Map[...].

Upvotes: 12

Related Questions