https://kotlinlang.org logo
#android
Title
# android
b

bengt.hammarlund

06/30/2017, 8:49 AM
Looks like you're trying to implement a method that already exists on enum classes, the valueOf() one. Is either that or you misunderstood enums and are trying to use them as normal classes (enums cannot be instantiated)
m

macmedan

06/30/2017, 3:00 PM
bengt.hammarlund: Ya that is what I came to. It was completely I did not understand how to use them properly. I am coming from an iOS background so things are just slightly different and I don't know all the ins and outs of things yet. Thanks for your help.
b

bengt.hammarlund

06/30/2017, 4:54 PM
No problem! Just keep in mind that the goal of an
Enum
is having predefined static values defined in a nicer way than for example an Interface or Class with public static final fields.