📄 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 + -