+#Registered enums
+enumNames=[]
 class Enumeration
-  #Registered enums
-  @types:[]
   #Static function that creates an enum object value. Uniqueness guarantied by object reference.
   #This objects's unique own field is the Enumeration name. It's read only.
   #string value shall be uppercase

    }
    #Guaranties properties to be 'final', non writable
    Object.freeze(this)


  constructor:(enumName,enumValues) ->
    #Check for uniqueness
    if enumName in enumNames then throw "#{enumName} already exists!"
    else enumNames.push enumName
    #Lambda to write enum values
    writeProperty = (property,key) => @[key or property]=Enumeration.value(property,enumName)
    if enumValues instanceof Array then writeProperty val for val in enumValues
