enums - Scala: give a constructor an enumeration and a function that takes that enumeration as a parameter -




i'm wondering if there way write following in scala:

class test(enumeration:enumeration, f:enumeration.value=>string){   // add fields here  } 

class test[a <: enumeration](val enumeration: a, f: a#value => string) {   // class body } 




wiki

Comments

Popular posts from this blog

elasticsearch - what is the equivalent data type for geo_point in hibernate search? -

Asterisk AGI Python Script to Dialplan does not work -

firebase - How to wait value in Ionic 2 -