?? foo.java
字號:
/**
* Title : Base Dict Class
* Description : here Description is the function of class, here maybe multirows
* @author <a href="mailto:sunpeng@china.freeborders">kevin</a>
* @Version 1.0
*/
package digester;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* Class description goes here.
* @version 1.0 2005-10-11
* @author kevin
*/
public class Foo
{
private String name;
private Map bars = new HashMap();
/**
* @return Returns the name.
*/
public String getName()
{
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name)
{
this.name = name;
}
public void addBar(Bar bar)
{
bars.put(bar.getId() + "", bar);
}
public Bar findBar(int id)
{
return (Bar)bars.get(id + "");
}
public Collection getBars()
{
return bars.entrySet();
}
public String toString()
{
String temp = "Foo name:" + this.name + "\n";
Collection c = getBars();
Iterator i = c.iterator();
while(i.hasNext())
{
temp += i.next().toString() + "\n";
}
return temp;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -