?? messagebuilder.java
字號(hào):
package com.javapatterns.builder.message;
import java.awt.Image;
/**
* This is an abstract builder class for building e-mail messages
*/
abstract class MessageBuilder {
/**
* Return an object of the subclass appropriate for the e-mail
* message format implied by the given destination address.
* @param dest The e-mail address the message is to be sent to
*/
static MessageBuilder getInstance(String dest) {
MessageBuilder builder = null;
//...
return builder;
} // getInstance(String)
/**
* pass the value of the "to" header field to this method.
*/
abstract void to(String value);
/**
* pass the value of the "from" header field to this method.
*/
abstract void from(String value);
//...
/**
* pass the value of the "organization" header field to this method.
*/
void organization(String value) { }
/**
* pass the content of a plain text body part to this method.
*/
abstract void plainText(String content);
/**
* pass the content of a jpeg image body part to this method.
*/
abstract void jpegImage(Image content) ;
/**
* complete and return the outbound e-mail message.
*/
abstract OutboundMessageIF getOutboundMsg() ;
} // class MessageBuilder
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -