?? phoneitem.java
字號:
/*
* Created on 2005-2-3
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package net.garrey.model;
/**
* @author Administrator
* Written by Garrey. All rights reserved by Garrey.
*/
public class PhoneItem {
private int id;
private String phonenum=null;
private String name=null;
public PhoneItem(String name,String phonenum){
this.name=name;
this.phonenum=phonenum;
}
public PhoneItem(int id,byte[] data){
this.id=id;
String temp=new String(data);
int ind=temp.indexOf(",");
if(ind!=-1){
name=temp.substring(0,ind);
phonenum=temp.substring(ind+1);
}
}
public int getId(){
return id;
}
public void setId(int id){
this.id=id;
}
public String getPhonenum(){
return phonenum;
}
public void setPhonenum(String num){
phonenum=num;
}
public String getName(){
return name;
}
public void setName(String na){
name=na;
}
public byte[] getBytes(){
String temp=null;
if(name==null||phonenum==null){
return null;
}else{
temp=name+","+phonenum;
}
return temp.getBytes();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -