pop3info.java

来自「该系统是一个基于p2p的即时聊天系统」· Java 代码 · 共 145 行

JAVA
145
字号
/* * @(#) POP3Info.java * Copyright 2004 HWStudio. All rights reserved. */package hws.item.smart.utility.mail;/** * POP3信息 * * @version 0.1 2005-07-12 * @author Hwerz */public class POP3Info extends Object {    /*------------------------------------------------------------------------*     *                                属性定义                                *     *------------------------------------------------------------------------*/    /**     * 接收邮件服务器地址     */    private String url;    /**     * 接收邮件服务器端口     */    private String port;    /**     * POP3邮箱账号     */    private String userID;    /**     * POP3邮箱密码     */    private String password;    /*------------------------------------------------------------------------*     *                                构造函数                                *     *------------------------------------------------------------------------*/    /**     * Create a new instance of this class     *     * @param url 接收邮件服务器地址     * @param port 接收邮件服务器端口     * @param userID POP3邮箱账号     * @param password POP3邮箱密码     */    public POP3Info(String url, String port, String userID, String password) {        super();        this.url = url;        this.port = port;        this.userID = userID;        this.password = password;    }    /*------------------------------------------------------------------------*     *                                公共方法                                *     *------------------------------------------------------------------------*/    /**     * 返回接收邮件服务器地址     *     * @return 接收邮件服务器地址     */    public String getURL() {        return url;    }    /**     * 设置接收邮件服务器地址     *     * @param url 待设置的接收邮件服务器地址     */    public void setURL(String url) {        this.url = url;    }    /**     * 返回接收邮件服务器端口     *     * @return 接收邮件服务器端口     */    public String getPort() {        return port;    }    /**     * 设置接收邮件服务器端口     *     * @param port 待设置的接收邮件服务器端口     */    public void setPort(String port) {        this.port = port;    }    /**     * 返回POP3邮箱账号     *     * @return POP3邮箱账号     */    public String getUserID() {        return userID;    }    /**     * 设置POP3邮箱账号     *     * @param userID 待设置的POP3邮箱账号     */    public void setUser(String userID) {        this.userID = userID;    }    /**     * 返回POP3邮箱密码     *     * @return POP3邮箱密码     */    public String getPassword() {        return password;    }    /**     * 设置POP3邮箱密码     *     * @param password 待设置的POP3邮箱密码     */    public void setPassword(String password) {        this.password = password;    }    /*------------------------------------------------------------------------*     *                                覆盖方法                                *     *------------------------------------------------------------------------*/    /**     * 覆盖超类Object的方法     *     * @param obj the reference object with which to compare     * @return true if this object is the same as the obj argument; false     * otherwise     */    public boolean equals(Object obj) {        boolean equal;        if (obj instanceof POP3Info) {            POP3Info info = (POP3Info) obj;            equal = userID.equals(info.getUserID());        } else {            equal = false;        }        return equal;    }    /**     * 覆盖超类Object的方法     *     * @return a hash code value for this object     */    public int hashCode() {        return super.hashCode() + userID.hashCode();    }}

⌨️ 快捷键说明

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