OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
[chemicraft/chemicraft.git] / common / chemicraft / ChemiCraftAPI.java
index 5630753..5f1a892 100644 (file)
@@ -1,50 +1,73 @@
-package chemicraft;
+package chemicraft;
 
 import java.util.ArrayList;
 
 public class ChemiCraftAPI {
 
+       /**
+        * Instance of the ChemiCraftAPI.
+        */
        public static ChemiCraftAPI instance = new ChemiCraftAPI();
 
-       private boolean addLanguage = false;
+       /**
+        * List of compounds names.
+        */
        private static ArrayList<String> compoundsNameList = new ArrayList();
+
+       /**
+        * List of compounds names(Some kind of language).
+        */
        private static ArrayList<String> compoundsLangNameList = new ArrayList();
+
+       /**
+        * List of compounds the language names.
+        */
        private static ArrayList<String> compoundsLangList = new ArrayList();
+
+       /**
+        * List of compounds handlers.
+        */
        private static ArrayList<ICompoundHandler> compoundHandlers = new ArrayList<ICompoundHandler>();
+
+       /**
+        * List of item name of handler to compounds.
+        */
        private static ArrayList<String> compoundHandlerItemNames = new ArrayList<String>();
 
+       /**
+        * add compound.
+        * @param name compound name.
+        */
        public static void addCompound(String name){
                compoundsNameList.add(name);
                compoundsLangNameList.add("");
                compoundsLangList.add("");
        }
 
+       /**
+        * add compound corresponding to the language.
+        * @param lang Language to the corresponding
+        * @param englishName compound name
+        * @param langName compound name(specified language)
+        */
        public static void addLangCompound(String lang, String englishName, String langName){
                compoundsNameList.add(englishName);
                compoundsLangNameList.add(langName);
                compoundsLangList.add(lang);
        }
 
-       public static ArrayList<String> getCompoundsName(){
-               compoundsNameList.trimToSize();
-               return compoundsNameList;
-       }
-
-       public static ArrayList<String> getCompoundsLangName(){
-               compoundsLangNameList.trimToSize();
-               return compoundsLangNameList;
-       }
-
-       public static ArrayList<String> getCompoundsLang(){
-               compoundsLangList.trimToSize();
-               return compoundsLangList;
-       }
-
-       public static void addCompoundHandler(String handlerItemName, ICompoundHandler compoundHandler){
+       /**
+        * setting compound handler.
+        * @param handlerItemName
+        * @param compoundHandler
+        */
+       public static void settingCompoundHandler(String handlerItemName, ICompoundHandler compoundHandler){
                ChemiCraftAPI.compoundHandlers.add(compoundHandler);
                compoundHandlerItemNames.add(handlerItemName);
        }
 
+       //\88È\8d~\83V\83X\83e\83\80\8aÖ\8cW\82Ì\83\81\83\\83b\83h//////////////////////////////////////////////////////
+
        public static ArrayList<ICompoundHandler> getCompoundHandler(){
                compoundHandlers.trimToSize();
                return compoundHandlers;
@@ -56,4 +79,19 @@ public class ChemiCraftAPI {
                return compoundHandlerItemNames;
        }
 
+       public static ArrayList<String> getCompoundsName(){
+               compoundsNameList.trimToSize();
+               return compoundsNameList;
+       }
+
+       public static ArrayList<String> getCompoundsLangName(){
+               compoundsLangNameList.trimToSize();
+               return compoundsLangNameList;
+       }
+
+       public static ArrayList<String> getCompoundsLang(){
+               compoundsLangList.trimToSize();
+               return compoundsLangList;
+       }
+
 }