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

📄 employee.java

📁 是关于struts+hibernate+spring开发宝典的源代码,希望对大家有帮助,
💻 JAVA
字号:
package cn.hxex.springcore.beanwrapper;

import java.util.HashMap;
import java.util.Iterator;

public class Employee {

	private float salary;
    private HashMap telephones = new HashMap();

	public HashMap getTelephones() {
		return telephones;
	}

	public void setTelephones(HashMap telephones) {
		this.telephones = telephones;
	}

	public float getSalary() {
		return salary;
	}

	public void setSalary(float salary) {
		this.salary = salary;
	}

	public String toString() {
		
		StringBuffer buf = new StringBuffer();
		
		buf.append( "salary=" ).append( getSalary() ).append( "\n" );
		buf.append( "telephones:\n" );
		Iterator it = getTelephones().keySet().iterator();
		while( it.hasNext() ) {
			Object key = it.next();
			Object value = telephones.get( key );
			buf.append( key ).append( "=" ).append( value ).append( "\n" );
		}
		
		return buf.toString();
	}
}

⌨️ 快捷键说明

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