enum basics - ãããã¡ã¢ã§åºæ¬çãªãã¨ãããããããã®ã§ãç§ããã使ã£ã¦ãenumé¢ä¿ã®ãã¿ã¼ã³ãããã¤ãã ã¹ãã¼ããã¿ã¼ã³ãenum㧠enumã使ãããã«ãªã£ã¦ã¾ãä¸çªå¤ãã£ãã®ãã private static final int SOME_STATE = 1; ã¿ãããªå ¸åçãªã¢ã³ããã¿ã¼ã³ãæ¸ããªããªãã¾ãããããã¯ã¹ãã¼ããã¿ã¼ã³ãé常ã«æ¸ãããããªã£ãããã ã¨æãã¾ãã ãããããªã³ã¼ãæ¸ãã¦ã¾ããæ¬å½ã¯ããã¡ãã£ã¨ããã¯å¦çã¨ããæ¸ããªãã¨ã ãã§ãããã¹ãã¼ãé¨åã¯å¤§æµãããªæãã§ãã public class Lifecycle { // åæç¶æ ã¯INITIALã«åºå® private State state = State.INITIAL; // å¤å´ã«å ¬éããç¶æ é·ç§»ã¡ã½ãã public void start() { state = state.st
{{#tags}}- {{label}}
{{/tags}}