December 10, 2008 Effective Java - item13 item 13 : Favor immutability ã¤ãã¥ã¼ã¿ãã«(immutable, ä¸å¤ã®)ãªãã¸ã§ã¯ãã¨ã¯ãååã®éãçæãããå¾ã«å é¨ç¶æ ãå¤åããªããªãã¸ã§ã¯ãã®ãã¨ãã¤ãã¥ã¼ã¿ãã«ãªãã¸ã§ã¯ãã¯ãã¥ã¼ã¿ãã«(mutable, å¯å¤ã®)ãªãã¸ã§ã¯ãããã¯ããã«ä½¿ãããããããã¯ã©ã¹ã¯ã§ããã ãimmutableã¨ããã¹ãã§ããã ã¤ãã¥ã¼ã¿ãã«ãªãã¸ã§ã¯ãã®ä¸»ãªå©ç¹ã¯æ¬¡ã®éãã ã·ã³ãã«ï¼ç¶æ ããã£ãã²ã¨ã¤ï¼ï¼ã¹ã¬ããã»ã¼ãï¼ã©ã®ã¹ã¬ããããªãã¸ã§ã¯ãã®ç¶æ ãå¤ããããªãã®ã§ï¼å ±æå¯è½ï¼å¿ç¨ï¼ãã使ããªãã¸ã§ã¯ãã®ãã£ãã·ã¥ï¼ä»ã®ãªãã¸ã§ã¯ãã®å åºãªæ§æè¦ç´ ã¨ãªãï¼e.x. Mapã®ãã¼ãSetã®è¦ç´ ã«æé©ï¼ã¤ãã¥ã¼ã¿ãã«ãªã¯ã©ã¹ãè¨è¨ããããã®ã«ã¼ã«ã¯ä»¥ä¸ã å é¨ç¶æ ãå¤åãããã¡ã½ãã
{{#tags}}- {{label}}
{{/tags}}