?? shortmessage.java
字號:
package edu.soft.buaa.message.sms;
import java.util.Date;
public class ShortMessage {
protected String id;
protected int memIndex;
protected Date date;
protected String originator;
protected String recipient;
protected String text;
protected int messageEncoding;
public ShortMessage(Date date, String originator, String recipient, String text, int memIndex)
{
this.date = date;
this.originator = originator;
this.recipient = recipient;
this.text = text;
this.memIndex = memIndex;
}
public ShortMessage(String recipient, String text)
{
this.recipient = recipient;
this.text = text;
}
/**
Returns the id of the message.
@return the id of the message.
*/
public String getId() { return id; }
/**
Returns the memory index of the GSM device, where the message is stored.
Applicable only for incoming messages.
@return the memory index of the message.
*/
public int getMemIndex() { return memIndex; }
/**
Returns the date of the message. For incoming messages, this is the sent date.
For outgoing messages, this is the creation date.
@return the date of the message.
*/
public Date getDate() { return date; }
/**
返回發送者的手機號
@return 發送者的手機號.
*/
public String getFromPhone() { return originator; }
/**
返回接收者的手機號
@return 接收者的手機號.
*/
public String getToPhone() { return recipient; }
/**
Returns the actual text of the message .
@return the text of the message.
*/
public String getText() { return text; }
/**
Set the id of the message.
@param id the id of the message.
*/
public void setId(String id) { this.id = id; }
/**
Set the text of the message.
@param text the text of the message.
*/
public void setText(String text) { this.text = text; }
/**
Set the date of the message.
@param date the date of the message.
*/
public void setDate(Date date) { this.date = date; }
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -