Posted by irohiroki Sun, 29 Aug 2010 09:15:00 GMT Rails 3ã§ã¯routesã®DSLãå®å ¨ã«å·æ°ããã¾ãããç¹ã«ããã®è¦é£ãã£ãããã·ã¥ã®å¡ã解ããã¦ã:memberã:getãªã©äºç´èªã®å½¹å²ããã¦ããã·ã³ãã«ã¯ãã£ã¬ã¯ãã£ãã«ãªãã¾ãããä¾ãã°Rails 2ã®ä»¥ä¸ã®è¨è¿°ã¯ map.resources :users, :member => {:foo => :get}, :collection => {:bar => :post}
Java ããã°ã©ãã³ã°ã§ã¯ããªãã¿ã® Vector, Hashtable ã¨ãã£ã java.utilããã±ã¼ã¸ã§æä¾ããã¦ããã³ã¬ã¯ã·ã§ã³ã¯ã©ã¹ãï¼ JDK1.2 ã§æ°ãããªãããã«å å®ãããã®ã¨ãªã£ãï¼ãããã¯ã³ã¬ã¯ã·ã§ã³ API ã¨å¼ã°ãã¦ããï¼ ããã§ã¯ï¼JDK1.2 ã§æ°ããå°å ¥ãããã³ã¬ã¯ã·ã§ã³ API ã® Collection, List, Set, Map ãªã©ã®ã¯ã©ã¹ãèå¯ãï¼ç°¡åãªä¾ãéãã¦ç解ãæ·±ããï¼ JDK1.2 ã® java.util ããã±ã¼ã¸ã«ã¯ï¼æ°ããã³ã¬ã¯ã·ã§ã³ API ãæä¾ãã㦠ããï¼JDK1.1 ã¾ã§ã¯ Vector, Hashtable ã¨ããã³ã¬ã¯ã·ã§ã³ãä¸è¬ç㫠使ããã¦ããï¼JDK1.2 ã§ããããã¯å¼ç¶ããµãã¼ãããã¦ãããï¼æ°ãã« Collection(è¦ç´ ã®éå), List(ã¤ã³ãã¯ã¹ä»ããããè¦ç´ å), Set(éè¤ã許ããªã
ArrayList ã¯é åãæ±ãä¸è¬çãªã¯ã©ã¹ã§ããArrayList<String> 㯠String åã®ãã¼ã¿ãè¦ç´ ã¨ãã¦æ㤠ArrayList ã§ãããã¨ã示ãã¦ãã¾ãã import java.util.*; class Main { public static void main(String[] args) { ArrayList<String> list = new ArrayList<String>(); list.add("AAA"); list.add("BBB"); list.add("CCC"); for (String s : list) { System.out.println(s); } } } Java 7 以éã§ã¯å³è¾ºã®åãçç¥ãããã¨ãã§ããããã«ãªãã¾ããã<> ã¯ãã¤ã¤ã¢ã³ãæ¼ç®åã¨å¼ã°ãã¾ãã ArrayList<String> list =
ååã§ã¯ãã³ã¬ã¯ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã«é¢ä¿ã®ããã¯ã©ã¹ã®ãã¡ãå ·ä½çãªå®è£ ã¯ã©ã¹ã«ã¤ãã¦ç´¹ä»ãã¾ãããä»åã¯ããã«è¸ã¿è¾¼ãã§ãã³ã¬ã¯ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã¨å¯æ¥ãªé¢ä¿ã®ãããåè¦ç´ ã«ã¢ã¯ã»ã¹ãããã®ã¯ã©ã¹ãã½ã¼ãããããã®ã¯ã©ã¹ãªã©ãé常ã«ä¾¿å©ãªã¯ã©ã¹ç¾¤ãç´¹ä»ãã¾ãã Iterator Collectionã®ä¸ã«å«ã¾ããåè¦ç´ ã«ã¢ã¯ã»ã¹ããå ´åãjava.util.Iteratorã使ç¨ãããã¨ã«ãªãã¾ãã Collectionã®ä¸èº«ãã¹ã¦ã«ã¢ã¯ã»ã¹ java.util.Collectionã¤ã³ã¿ã¼ãã§ã¼ã¹ã«ã¯æ¬¡ã®ãããªã¡ã½ãããããã¾ãã java.util.Iterator iterator() ã³ã¬ã¯ã·ã§ã³ã®è¦ç´ ã®å復åãåå¾ããã ãã®ã¡ã½ããã使ç¨ãã¦Iteratorãåå¾ãããã¨ã«ãããç°¡åã«Collectionã®åè¦ç´ ã«ã¢ã¯ã»ã¹ã§ãã¾ãã java.util.Iteratorã
HOMMEZ(ãªã ãº)ã¯ç·æ§ã®å¿ã¨èº«ä½ã®å¥åº·ãæ¯æ´ããä¸äººã§ãå¤ãã®äººãåä¾ãå¾ã幸ããç·æ§ã¨ãã¦ã®åã³ã享åã§ãã社ä¼ã®å®ç¾ãç®æãã¦ãã¾ããç·æ§ã®å¦æ´»ãæ´»åã«ã¾ã¤ããæ å ±ãååã®åã§æ§ãå¦æ´»ã«æ©ãç·æ§ãå¹ççã«ç´å¾æãæã£ã¦æ´»åã§ããæ©ä¼ãåµåºãã¾ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}