⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tbdictionary.java

📁 利用JAVA编写的群体机器人局部通讯完成一定得队形控制
💻 JAVA
字号:
package EDU.cmu.cs.coral.util;import java.util.Hashtable;/**  * This is like a hashtable but we can specify the type  * right from the table (instead of Object like Hashtable does)  *<P>  * <A HREF="../COPYRIGHT.html">Copyright</A>  * (c)1999 John Sweeney and Carnegie Mellon University  */public class TBDictionary extends Hashtable {  /**    * get the int referenced by key    */  public int getInt(String key) {    return (int) getDouble(key);  }  /**     * get the double referenced by key    */  public double getDouble(String key) {    String val = (String) get(key);    if (val == null) {      System.out.println("key \""+key+"\" is not in this TBDictionary!");    }    Double d = new Double(val);    return d.doubleValue();  }  /**    *get the string referenced by key    */  public String getString(String key) {    return (String)get(key);  }}  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -