Java enum constructor error
<p>I'm trying to create an <code>enum</code> class so that I can use each value in a for loop, getting each value one at a time.</p>

<p>This is my <code>enum</code> declaration:</p>

<pre><code>public enum SpaceStyle {

    public SpaceStyle(spaceStyle1, spaceStyle2, spaceStyle3);
    private String key;

    SpaceStyle(String key) {
        this.key = key;
    }

    public String getKey() {
        return key;
    }
}
</code></pre>

<p>This is the <code>for</code> loop where I want to loop and use each method.</p>

<pre><code>for (SpaceStyle key : SpaceStyle.values()) {
    Map&lt;String, String&gt; contentMap = createContentMap(conf, versionNumber, data);
    createAndPopulateSpace(conf, versionNumber, contentMap, key.toString());
}

// The final method where the key of the enum will be used.
public StudioResponse createSpace(ProductInstance conf, VersionNumber \
            versionNumber, String spaceName, String spaceKey, String key) {
    return conf.buildRequest("/createspace.action")
        .setArg("name", spaceName)
        .setArg("key", spaceKey)
        .setArg("permissionSetter.registeredCanView", "true")
        .setArg("permissionSetter.registeredCanEdit", "true")
        .setArg("themeKey", "com.atlassian.studio.confluence" + key)
        .execute("Creating space '" + spaceName + "'");
    }
}
</code></pre>
